diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-06-23 16:13:50 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-06-25 09:57:18 +0200 |
commit | 31e53584db5879894809fbde5445aac7553ac3e2 (patch) | |
tree | 2cdf73cadcb2bbc0e7d9308ef46b9a4a7e44db23 /lib/escape.h | |
parent | 646cc574f0b72723906224824a57cd37ee88e9df (diff) | |
download | curl-31e53584db5879894809fbde5445aac7553ac3e2.tar.gz |
escape: make the URL decode able to reject only %00 bytes
... or all "control codes" or nothing.
Assisted-by: Nicolas Sterchele
Diffstat (limited to 'lib/escape.h')
-rw-r--r-- | lib/escape.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/escape.h b/lib/escape.h index d8bbe5cb0..586db7e67 100644 --- a/lib/escape.h +++ b/lib/escape.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,9 +25,16 @@ * allocated string or NULL if an error occurred. */ bool Curl_isunreserved(unsigned char in); + +enum urlreject { + REJECT_NADA = 2, + REJECT_CTRL, + REJECT_ZERO +}; + CURLcode Curl_urldecode(struct Curl_easy *data, const char *string, size_t length, char **ostring, size_t *olen, - bool reject_crlf); + enum urlreject ctrl); #endif /* HEADER_CURL_ESCAPE_H */ |