From 70b83a63973d02f04868139213965b2e1d930f9f Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Fri, 24 Aug 2018 15:17:32 -0400 Subject: [PATCH] v1.0.0-beta.5 - Fixed Mojang issue resulting in "Failed to verify username" for specific users. The Mojang API may randomly return extraneous spaces around the displayName and username fields. Launching the game with these values will result in the aforementioned error. The launcher now trims these values as a precautionary measure. --- app/assets/js/configmanager.js | 4 ++-- app/assets/js/processbuilder.js | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 00d25c31..73392098 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -318,9 +318,9 @@ exports.addAuthAccount = function(uuid, accessToken, username, displayName){ config.selectedAccount = uuid config.authenticationDatabase[uuid] = { accessToken, - username, + username: username.trim(), uuid, - displayName + displayName: displayName.trim() } return config.authenticationDatabase[uuid] } diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index db6af7a8..764594c6 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -252,10 +252,10 @@ class ProcessBuilder { let val = null switch(identifier){ case 'auth_player_name': - val = this.authUser.displayName + val = this.authUser.displayName.trim() break case 'version_name': - //val = versionData.id + //val = versionData.id val = this.server.getID() break case 'game_directory': diff --git a/package-lock.json b/package-lock.json index 2ccc2c24..4e3afb68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "westeroscraftlauncher", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bac94cd2..4c1a74d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "westeroscraftlauncher", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "Custom modded launcher for Westeroscraft", "productName": "WesterosCraft Launcher", "main": "index.js",