Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/Horde/Crypt/Pgp/Keyserver.php: Newer keyserver implementations UR… #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/Horde/Crypt/Pgp/Keyserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ public function getKeyId($address)
if (strpos($response->getHeader('Content-Type'), 'text/plain') !== 0) {
continue;
}
$output = $response->getBody();
$body = $response->getBody();
if (urlencode(urldecode($body)) === $body) {
$output = urldecode($body);
} else {
$output = $body;
}
Copy link
Contributor Author

@sunweaver sunweaver Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that this should work in theory, but fails sometimes in reality.

I have reverted this on my running instance back to

-                $output = $response->getBody();
+                $body = $response->getBody();
+                $output = urldecode($body);

And I only use a keyserver that returns results urlencoded.

} catch (Horde_Http_Exception $e) {
throw new Horde_Crypt_Exception($e);
}
Expand Down