Change + to space to allows nice + be in the url

This commit is contained in:
Adam Stankiewicz 2017-04-10 13:25:43 +02:00
parent 81b90010e8
commit ff2635678a
No known key found for this signature in database
GPG Key ID: A62480DCEAC884DF
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ func ParsePermissions(s string) (*Permissions, error) {
return &Permissions{}, nil
}
perms := strings.Split(s, "+")
perms := strings.Split(s, " ")
for _, perm := range perms {
parts := strings.Split(perm, ":")

View File

@ -46,7 +46,7 @@ var permissionsTests = []struct {
Ports: PortSet{PortRange{Min: 0, Max: 65535}},
},
}},
{"bind:127.0.0.1,localhost:80,443,8000-8100+connect:*.google.pl:80,443", &Permissions{
{"bind:127.0.0.1,localhost:80,443,8000-8100 connect:*.google.pl:80,443", &Permissions{
Permission{
Actions: StringSet{"bind"},
Hosts: StringSet{"127.0.0.1", "localhost"},