Case-sensitive matching on HKP requests.

This commit is contained in:
Justus Winter 2019-02-26 13:52:58 +01:00
parent 425bc3d609
commit 7123c884bb
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
1 changed files with 3 additions and 3 deletions

View File

@ -43,21 +43,21 @@ http {
# Common HKP requests.
location /pks/lookup {
# sq keyserver get <KEYID>, gpg --receive-keys <KEYID>
if ($args ~* "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{14})$") {
if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{14})$") {
set $dir $2;
set $file $3;
rewrite . /by-keyid/$dir/$file;
}
# gpg --receive-keys <FINGERPRINT>
if ($args ~* "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{38})$") {
if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{38})$") {
set $dir $2;
set $file $3;
rewrite . /by-fingerprint/$dir/$file;
}
# gpg --locate-key <EMAIL>
if ($args ~* "^op=get&options=mr&?search=(..)([^&]*)(@|%40)([^&]*)") {
if ($args ~ "^op=get&options=mr&?search=(..)([^&]*)(@|%40)([^&]*)") {
set $dir $1;
set $local $2;
set $horst $4;