diff options
author | Vasily <JustAMan@users.noreply.github.com> | 2018-11-23 17:59:03 +0300 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2018-11-23 14:59:03 +0000 |
commit | dc41b3533326d745c65afaea4cb34c229a31d0c3 (patch) | |
tree | b00c38c6c0be26a19216ace986a414fb7636a0d2 /src | |
parent | f44d0f387b2e9bfcacf1c5ee15363fbc3a8e0e75 (diff) |
Basic Auth: allow almost all possible characters for user/pass
previously was restricted to alphanumeric chars only.
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -52,6 +52,8 @@ #define BOOL "(yes|on|no|off)" #define INT "((0x)?[[:digit:]]+)" #define ALNUM "([-a-z0-9._]+)" +#define USERNAME "([^:]*)" +#define PASSWORD "([^@]*)" #define IP "((([0-9]{1,3})\\.){3}[0-9]{1,3})" #define IPMASK "(" IP "(/[[:digit:]]+)?)" #define IPV6 "(" \ @@ -257,7 +259,7 @@ struct { }, { BEGIN "(upstream)" WS "(http|socks4|socks5)" WS - "(" ALNUM /*username*/ ":" ALNUM /*password*/ "@" ")?" + "(" USERNAME /*username*/ ":" PASSWORD /*password*/ "@" ")?" "(" IP "|" ALNUM ")" ":" INT "(" WS STR ")?" END, handle_upstream, NULL |