Selaa lähdekoodia

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.
Daniel Scalzi 7 vuotta sitten
vanhempi
sitoutus
70b83a6397
4 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 2 2
      app/assets/js/configmanager.js
  2. 2 2
      app/assets/js/processbuilder.js
  3. 1 1
      package-lock.json
  4. 1 1
      package.json

+ 2 - 2
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]
 }

+ 2 - 2
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':

+ 1 - 1
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": {

+ 1 - 1
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",