Call encodeURIComponent on hkp query parameters
This commit is contained in:
parent
b60bea547b
commit
450fddaf8e
|
@ -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!');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user