aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/http.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 15:13:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 15:13:35 +0100
commitc3889c74a06442e3bfce26a74bd269a1e42a4b32 (patch)
treee516784a99690de3cbe12433bf6173050ae67a26 /src/libutil/http.c
parent16a32a939711e98b4ec8c91d34ad7b4712e88af9 (diff)
downloadrspamd-c3889c74a06442e3bfce26a74bd269a1e42a4b32.tar.gz
rspamd-c3889c74a06442e3bfce26a74bd269a1e42a4b32.zip
Remove quotes in HTTP query values
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r--src/libutil/http.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c
index 72134e22d..f6f08e376 100644
--- a/src/libutil/http.c
+++ b/src/libutil/http.c
@@ -2466,6 +2466,15 @@ rspamd_http_message_parse_query (struct rspamd_http_message *msg)
value_tok->len = rspamd_decode_url (value->str,
value->str,
value->len);
+ /* Detect quotes for value */
+ if (value_tok->begin[0] == '"') {
+ memmove (value->str, value->str + 1,
+ value_tok->len - 1);
+ value_tok->len --;
+ }
+ if (value_tok->begin[value_tok->len - 1] == '"') {
+ value_tok->len --;
+ }
}
else {
value = rspamd_fstring_new_init ("", 0);