From 796bb82e8f5600416f9567eada0bd07f4e3790ce Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 14 Feb 2021 09:16:10 -0500 Subject: [PATCH] fix broken double slash redirect nginx doesn't sanitize input to statements like return. --- nginx/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2823e65e..694ac76f 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -116,8 +116,8 @@ http { return 301 /$1; } - if ($request_uri ~ "//") { - return 301 $uri$is_args$args; + if ($request_uri ~ (.*)//(.*)) { + return 301 $1/$2; } location = /security.txt {