diff options
author | andreizdor <andreizdor@yandex-team.com> | 2023-02-16 12:32:45 +0300 |
---|---|---|
committer | andreizdor <andreizdor@yandex-team.com> | 2023-02-16 12:32:45 +0300 |
commit | f1eff52148cd5cf1c8b895eed1dc85c22d438eb9 (patch) | |
tree | 67cb49b4e168e6d3148248782c516438428a46fa /library/cpp/string_utils/quote/quote.cpp | |
parent | 2d466cb51cdcc7a2de1685144bc5c2a6794d825e (diff) | |
download | ydb-f1eff52148cd5cf1c8b895eed1dc85c22d438eb9.tar.gz |
Fix escaping cgi, according to RFC 3986 standart
https://www.ietf.org/rfc/rfc3986.txt
Символ `^` не входит в допустимые символы URI
Diffstat (limited to 'library/cpp/string_utils/quote/quote.cpp')
-rw-r--r-- | library/cpp/string_utils/quote/quote.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/string_utils/quote/quote.cpp b/library/cpp/string_utils/quote/quote.cpp index a7a4749d99..6a117c424a 100644 --- a/library/cpp/string_utils/quote/quote.cpp +++ b/library/cpp/string_utils/quote/quote.cpp @@ -75,18 +75,18 @@ static inline const char* FixZero(const char* s) noexcept { // '%', '&', '+', ',', // '#', '<', '=', '>', // '[', '\\',']', '?', -// ':', '{', '}', +// ':', '{', '}', '^' // all below ' ' (0x20) and above '~' (0x7E). // ' ' converted to '+' static const bool chars_to_url_escape[256] = { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F +// 0 1 2 3 4 5 6 7 8 9 A B C D E F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, //0 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, //1 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, //2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, //3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //4 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, //5 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, //5 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, //7 |