mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-28 09:10:25 +08:00
callback with an error if we don't get a valid RSA key (resolves #29)
This commit is contained in:
parent
01428e6007
commit
448b32b9c6
5
index.js
5
index.js
@ -69,6 +69,11 @@ SteamCommunity.prototype.login = function(details, callback) {
|
||||
callback(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!json.publickey_mod || !json.publickey_exp) {
|
||||
callback(new Error("Invalid RSA key received"));
|
||||
return;
|
||||
}
|
||||
|
||||
var key = new RSA();
|
||||
key.setPublic(json.publickey_mod, json.publickey_exp);
|
||||
|
Loading…
Reference in New Issue
Block a user