steamcommunity 3.48.1 → 3.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -165,9 +165,9 @@ SteamCommunity.prototype._setCookie = function(cookie, secure) {
165
165
 
166
166
  SteamCommunity.prototype.setCookies = function(cookies) {
167
167
  cookies.forEach((cookie) => {
168
- var cookieName = cookie.match(/(.+)=/)[1];
168
+ var cookieName = cookie.trim().split('=')[0];
169
169
  if (cookieName == 'steamLogin' || cookieName == 'steamLoginSecure') {
170
- this.steamID = new SteamID(cookie.match(/=(\d+)/)[1]);
170
+ this.steamID = new SteamID(cookie.match(/steamLogin(Secure)?=(\d+)/)[2]);
171
171
  }
172
172
 
173
173
  this._setCookie(Request.cookie(cookie), !!(cookieName.match(/^steamMachineAuth/) || cookieName.match(/Secure$/)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamcommunity",
3
- "version": "3.48.1",
3
+ "version": "3.48.2",
4
4
  "description": "Provides an interface for logging into and interacting with the Steam Community website",
5
5
  "files": [
6
6
  "/classes",