Fix url bug in allow list

This commit is contained in:
Vikram Rangnekar
2019-07-29 01:49:48 -04:00
parent 2d8fc2b7e2
commit dd085fb7fd
4 changed files with 696 additions and 825 deletions

View File

@ -68,10 +68,11 @@ func (al *allowList) load() {
for {
if c == 0 && b[e] == '#' {
s = e
for ; b[e] != '\n' && e < len(b); e++ {
if (e - s) > 2 {
uri = strings.TrimSpace(string(b[s+1 : e]))
}
for b[e] != '\n' && e < len(b) {
e++
}
if (e - s) > 2 {
uri = strings.TrimSpace(string(b[(s + 1):e]))
}
}
if b[e] == '{' {