mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-02-28 22:13:33 +00:00
Call encodeURIComponent on hkp query parameters
This commit is contained in:
@@ -53,9 +53,9 @@ HKP.prototype.lookup = function(options) {
|
||||
fetch = this._fetch;
|
||||
|
||||
if (options.keyId) {
|
||||
uri += '0x' + options.keyId;
|
||||
uri += '0x' + encodeURIComponent(options.keyId);
|
||||
} else if (options.query) {
|
||||
uri += options.query;
|
||||
uri += encodeURIComponent(options.query);
|
||||
} else {
|
||||
throw new Error('You must provide a query parameter!');
|
||||
}
|
||||
@@ -86,4 +86,4 @@ HKP.prototype.upload = function(publicKeyArmored) {
|
||||
},
|
||||
body: 'keytext=' + encodeURIComponent(publicKeyArmored)
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user