1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix infinite loop when parsing empty nonnative subscription content (#3208)

This commit is contained in:
Xiaokang Wang (Shelikhoo) 2024-10-27 21:50:37 +00:00 committed by GitHub
parent cab66deace
commit 2415b89510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,6 +30,10 @@ func (a *AbstractNonNativeLink) fromBytes(bytes []byte) {
}
func (a *AbstractNonNativeLink) extractValue(content, prefix string) {
if content == "" {
return
}
{
// check if the content is a link
match, err := regexp.Match("[a-zA-Z0-9]+:((\\/\\/)|\\?)", []byte(content))