Browse Source
Change + to space to allows nice + be in the url
pull/105/head
Adam Stankiewicz
9 years ago
No known key found for this signature in database
GPG Key ID: A62480DCEAC884DF
2 changed files with
2 additions and
2 deletions
-
permissions.go
-
permissions_test.go
|
|
@ -148,7 +148,7 @@ func ParsePermissions(s string) (*Permissions, error) { |
|
|
return &Permissions{}, nil |
|
|
return &Permissions{}, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
perms := strings.Split(s, "+") |
|
|
perms := strings.Split(s, " ") |
|
|
|
|
|
|
|
|
for _, perm := range perms { |
|
|
for _, perm := range perms { |
|
|
parts := strings.Split(perm, ":") |
|
|
parts := strings.Split(perm, ":") |
|
|
|
|
|
@ -46,7 +46,7 @@ var permissionsTests = []struct { |
|
|
Ports: PortSet{PortRange{Min: 0, Max: 65535}}, |
|
|
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{ |
|
|
Permission{ |
|
|
Actions: StringSet{"bind"}, |
|
|
Actions: StringSet{"bind"}, |
|
|
Hosts: StringSet{"127.0.0.1", "localhost"}, |
|
|
Hosts: StringSet{"127.0.0.1", "localhost"}, |
|
|
|