From d79f5c3ef2d879f2afd73b12ed261b73c8887191 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 1 Jul 2019 13:28:42 -0400 Subject: [PATCH] nginx: be more flexible when handling full-uid --searches This addresses the final bit of #94. It is concretely useful for fielding queries like: gpg --search '=Alice Jones ' Signed-off-by: Daniel Kahn Gillmor --- hagrid-routes.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hagrid-routes.conf b/hagrid-routes.conf index 9381083..069bb05 100644 --- a/hagrid-routes.conf +++ b/hagrid-routes.conf @@ -87,7 +87,7 @@ location /pks/lookup { # strip angle brackets - we don't need them, but they cause issues # with the Rocket framework # see https://gitlab.com/sequoia-pgp/hagrid/issues/94 - if ($request_uri ~ "^/pks/lookup\?(.*)\<(.+)\>(.*)") { + if ($request_uri ~ "^/pks/lookup\?(.*search=)[^&<>]*\<(.+)\>(.*)") { set $left $1; set $middle $2; set $right $3;