From e4600cd5c481d060b76dcea6b53cd731e94fba2f Mon Sep 17 00:00:00 2001 From: Andre Tabarra Date: Mon, 30 Mar 2020 01:48:38 -0300 Subject: [PATCH] Increased time tolerances for CitizenFX login. Minor message tweaks. --- fxmanifest.lua | 2 +- src/components/authenticator/index.js | 2 +- src/components/authenticator/providers/CitizenFX.js | 2 +- src/index.js | 2 +- version.json | 8 ++++++-- web/settings.html | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 3702a93ad..195e3d20e 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -4,7 +4,7 @@ games { 'gta5' } author 'Tabarra' description 'Remotely Manage & Monitor your GTA5 FiveM Server' repository 'https://github.com/tabarra/txAdmin' -version '2.0.0' +version '2.0.1' server_script 'starter.js' diff --git a/src/components/authenticator/index.js b/src/components/authenticator/index.js index e95bf659b..9efcd2612 100644 --- a/src/components/authenticator/index.js +++ b/src/components/authenticator/index.js @@ -343,7 +343,7 @@ module.exports = class Authenticator { } let structureIntegrityTest = jsonData.some((x) => { - if(typeof x.name !== 'string' || x.name < 6) return true; + if(typeof x.name !== 'string' || x.name < 3) return true; if(typeof x.master !== 'boolean') return true; if(typeof x.password_hash !== 'string' || !x.password_hash.startsWith('$2')) return true; if(typeof x.providers !== 'object') return true; diff --git a/src/components/authenticator/providers/CitizenFX.js b/src/components/authenticator/providers/CitizenFX.js index ef725d89a..cee78f0eb 100644 --- a/src/components/authenticator/providers/CitizenFX.js +++ b/src/components/authenticator/providers/CitizenFX.js @@ -30,7 +30,7 @@ module.exports = class CitizenFXProvider { client_secret: 'txadmin_test', response_types: ['openid'] }); - this.client[custom.clock_tolerance] = 15; + this.client[custom.clock_tolerance] = 2*60*60; //Two hours due to the DST change. Reduce to 300s. if(globals.config.verbose) log('CitizenFX Provider configured.'); this.ready = true; } catch (error) { diff --git a/src/index.js b/src/index.js index dd9f71ed6..72bf35e7d 100644 --- a/src/index.js +++ b/src/index.js @@ -40,7 +40,7 @@ const resourceName = GetCurrentResourceName(); //Getting fxserver version const fxServerVersion = getBuild(GetConvar('version', 'false')); if(!fxServerVersion){ - logDie(`version convar not set or in the wrong format`); + logDie(`This version of FXServer is NOT compatible with txAdmin v2. Please update it to build 2310 or above. (version convar not set or in the wrong format)`); } //Getting txAdmin version diff --git a/version.json b/version.json index 5d36dbf74..03197a033 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "changelog": "Deprecated Message. Please Update.", "allVersions": [ { @@ -143,8 +143,12 @@ "changelog": "LEGACY: added support for servers without run.cmd" }, { - "version": "v2.0.0", + "version": "2.0.0", "changelog": "Integrated with FiveM! New Responsive Interface! New Auth system. Migrated from Express to Koa. Got rid of setup, and admin-add scripts. Changed the `data` folder location. And many many more tweaks and improvements!" + }, + { + "version": "2.0.1", + "changelog": "Increased time tolerances for CitizenFX login. Minor message tweaks." } ] } diff --git a/web/settings.html b/web/settings.html index 9a612c5b3..76a44beef 100644 --- a/web/settings.html +++ b/web/settings.html @@ -141,7 +141,7 @@

Settings

-