From 6beb17e095d006393405d9882fb762837df78588 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 2 Apr 2024 11:52:04 +0200 Subject: [PATCH] nominatim: improve IP query block expression --- cookbooks/nominatim/templates/default/nginx.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/nominatim/templates/default/nginx.erb b/cookbooks/nominatim/templates/default/nginx.erb index f4eec183e..4f171bf06 100644 --- a/cookbooks/nominatim/templates/default/nginx.erb +++ b/cookbooks/nominatim/templates/default/nginx.erb @@ -194,7 +194,7 @@ server { { return 403; } if ($blocked_email) { return 403; } - if ($args ~* "q=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[ &]") + if ($arg_q ~* "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$") { return 418; } include <%= @confdir %>/nginx_blocked_generic.conf; -- 2.39.5