Merge pull request #189 from Aareksio/patch-1

Fix infinite loop in getWebApiKey
This commit is contained in:
Alex Corn
2018-01-22 01:48:17 -05:00
committed by GitHub

View File

@@ -14,6 +14,10 @@ SteamCommunity.prototype.getWebApiKey = function(domain, callback) {
if(body.match(/<h2>Access Denied<\/h2>/)) {
return callback(new Error("Access Denied"));
}
if(body.match(/You must have a validated email address to create a Steam Web API key./)) {
return callback(new Error("You must have a validated email address to create a Steam Web API key."));
}
var match = body.match(/<p>Key: ([0-9A-F]+)<\/p>/);
if(match) {