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 <alice@example.net>'

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
Daniel Kahn Gillmor 2019-07-01 13:28:42 -04:00
parent 27041e6d00
commit d79f5c3ef2
1 changed files with 1 additions and 1 deletions

View File

@ -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;