mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 03:25:05 -05:00
Fixed Issue #683 which caused OK to crash upon importing keys which contain percent signs.
This commit is contained in:
parent
b43fb63753
commit
f68cf2a435
@ -316,6 +316,12 @@ public class HkpKeyserver extends Keyserver {
|
|||||||
while (uidMatcher.find()) {
|
while (uidMatcher.find()) {
|
||||||
String tmp = uidMatcher.group(1).trim();
|
String tmp = uidMatcher.group(1).trim();
|
||||||
if (tmp.contains("%")) {
|
if (tmp.contains("%")) {
|
||||||
|
if(tmp.contains("%%")) {
|
||||||
|
// This is a fix for issue #683
|
||||||
|
// The server encodes a percent sign as %%, so it is swapped out with its
|
||||||
|
// urlencoded counterpart to prevent errors
|
||||||
|
tmp = tmp.replace("%%", "%25");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// converts Strings like "Universit%C3%A4t" to a proper encoding form "Universität".
|
// converts Strings like "Universit%C3%A4t" to a proper encoding form "Universität".
|
||||||
tmp = (URLDecoder.decode(tmp, "UTF8"));
|
tmp = (URLDecoder.decode(tmp, "UTF8"));
|
||||||
|
Loading…
Reference in New Issue
Block a user