mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Fix array subscription in unescape_url
Passwords with url escaped characters were parsed incorrectly. The variable used for iterating over `url` should be `i`, not `pos`. This patch fixes the problem. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
11bc2819da
commit
41ff067641
@@ -86,8 +86,8 @@ char *unescape_url(void *pool, const char *url, unsigned len, unsigned *out_len)
|
||||
char b[3];
|
||||
unsigned int u;
|
||||
|
||||
b[0] = url[pos + 1];
|
||||
b[1] = url[pos + 2];
|
||||
b[0] = url[i + 1];
|
||||
b[1] = url[i + 2];
|
||||
b[2] = 0;
|
||||
|
||||
if (sscanf(b, "%02x", &u) <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user