From ff2635678a36aaa6df7005fad90a71ba57050c89 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 10 Apr 2017 13:25:43 +0200 Subject: [PATCH] Change + to space to allows nice + be in the url --- permissions.go | 2 +- permissions_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/permissions.go b/permissions.go index ac55722..3e079eb 100644 --- a/permissions.go +++ b/permissions.go @@ -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, ":") diff --git a/permissions_test.go b/permissions_test.go index ff3f65f..bc99824 100644 --- a/permissions_test.go +++ b/permissions_test.go @@ -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"},