From 0eb27a15d229026015f0d5b8af107053ed68d1a9 Mon Sep 17 00:00:00 2001 From: Arkadiusz Sygulski Date: Mon, 22 Jan 2018 03:48:45 +0100 Subject: [PATCH] Fix infinite loop in getWebApiKey Fix infinite loop in getWebApiKey when trying to get web api key on account without email address confirmed --- components/webapi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/webapi.js b/components/webapi.js index 86945ff..dc507fa 100644 --- a/components/webapi.js +++ b/components/webapi.js @@ -14,6 +14,10 @@ SteamCommunity.prototype.getWebApiKey = function(domain, callback) { if(body.match(/

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(/

Key: ([0-9A-F]+)<\/p>/); if(match) {