From 4eba14f15008564d53470ca7dd7ca2b2c8ad0b11 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 May 2020 13:01:50 -0400 Subject: [PATCH] [deploy] Update safe params for Array params (#7914) --- config/fastly/snippets/safe_params_list.vcl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/fastly/snippets/safe_params_list.vcl b/config/fastly/snippets/safe_params_list.vcl index 65a9d9e82..d677a614a 100644 --- a/config/fastly/snippets/safe_params_list.vcl +++ b/config/fastly/snippets/safe_params_list.vcl @@ -1,7 +1,9 @@ import querystring; sub vcl_recv { - # return this URL with only the parameters that match this regular expression - if (req.url !~ "/internal/" && req.url !~ "/search/" && req.url !~ "/bulk_show") { - set req.url = querystring.regfilter_except(req.url, "^(a_id|args|article_id|article_ids|articles|asc|callback_url|category|chat_channel_id|client_id|code|collection_id|commentable_id|commentable_type|confirmation_token|created_at|end|filter|followable_id|followable_type|fork_id|i|key|message_offset|name|oauth_token|oauth_verifier|offset|org_id|organization_id|p|page|per_page|prefill|preview|purchaser|reactable_ids|redirect_uri|reported_url|reporter_username|response_type|scope|search|signature|sort|start|state|status|tag|tag_list|top|type_of|url|username|ut|verb)$"); - } + # return this URL with only the parameters that match this regular expression + if (req.url !~ "/internal/" && req.url !~ "/search/") { + set req.http.decodeurl = urldecode(req.url); + set req.http.decodeurl = querystring.regfilter_except(req.http.decodeurl, "^(a_id|args|article_id|article_ids|articles|asc|callback_url|category|chat_channel_id|client_id|code|collection_id|commentable_id|commentable_type|confirmation_token|created_at|end|filter|followable_id|followable_type|fork_id|i|ids\[\]|key|message_offset|name|oauth_token|oauth_verifier|offset|org_id|organization_id|p|page|per_page|prefill|preview|purchaser|reactable_ids|redirect_uri|reported_url|reporter_username|response_type|scope|search|signature|sort|start|state|status|tag|tag_list|top|type_of|url|username|ut|verb)$"); + set req.url = req.http.decodeurl; + } }