mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed default session renew timer.
This commit is contained in:
parent
b6cc60c1ac
commit
0e697167e9
6 changed files with 66 additions and 10 deletions
30
webserver.js
30
webserver.js
|
@ -2458,7 +2458,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
serverfeatures: serverFeatures,
|
||||
features: features,
|
||||
features2: features2,
|
||||
sessiontime: args.sessiontime,
|
||||
sessiontime: (args.sessiontime) ? args.sessiontime : 60,
|
||||
mpspass: args.mpspass,
|
||||
passRequirements: passRequirements,
|
||||
customui: customui,
|
||||
|
@ -2562,7 +2562,33 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
if (domain.customui != null) { customui = encodeURIComponent(JSON.stringify(domain.customui)); }
|
||||
|
||||
// Render the login page
|
||||
render(req, res, getRenderPage((domain.sitestyle == 2) ? 'login2' : 'login', req, domain), getRenderArgs({ loginmode: loginmode, rootCertLink: getRootCertLink(), newAccount: newAccountsAllowed, newAccountPass: (((domain.newaccountspass == null) || (domain.newaccountspass == '')) ? 0 : 1), serverDnsName: obj.getWebServerName(domain), serverPublicPort: httpsPort, passlogin: (typeof domain.showpasswordlogin == 'boolean') ? domain.showpasswordlogin : true, emailcheck: emailcheck, features: features, sessiontime: args.sessiontime, passRequirements: passRequirements, customui: customui, footer: (domain.loginfooter == null) ? '' : domain.loginfooter, hkey: encodeURIComponent(hardwareKeyChallenge).replace(/'/g, '%27'), messageid: msgid, passhint: passhint, welcometext: domain.welcometext ? encodeURIComponent(domain.welcometext).split('\'').join('\\\'') : null, hwstate: hwstate, otpemail: otpemail, otpsms: otpsms, twoFactorCookieDays: twoFactorCookieDays, authStrategies: authStrategies.join(','), loginpicture: (typeof domain.loginpicture == 'string') }, req, domain, (domain.sitestyle == 2) ? 'login2' : 'login'));
|
||||
render(req, res,
|
||||
getRenderPage((domain.sitestyle == 2) ? 'login2' : 'login', req, domain),
|
||||
getRenderArgs({
|
||||
loginmode: loginmode,
|
||||
rootCertLink: getRootCertLink(),
|
||||
newAccount: newAccountsAllowed,
|
||||
newAccountPass: (((domain.newaccountspass == null) || (domain.newaccountspass == '')) ? 0 : 1),
|
||||
serverDnsName: obj.getWebServerName(domain),
|
||||
serverPublicPort: httpsPort,
|
||||
passlogin: (typeof domain.showpasswordlogin == 'boolean') ? domain.showpasswordlogin : true,
|
||||
emailcheck: emailcheck,
|
||||
features: features,
|
||||
sessiontime: (args.sessiontime) ? args.sessiontime : 60,
|
||||
passRequirements: passRequirements,
|
||||
customui: customui,
|
||||
footer: (domain.loginfooter == null) ? '' : domain.loginfooter,
|
||||
hkey: encodeURIComponent(hardwareKeyChallenge).replace(/'/g, '%27'),
|
||||
messageid: msgid,
|
||||
passhint: passhint,
|
||||
welcometext: domain.welcometext ? encodeURIComponent(domain.welcometext).split('\'').join('\\\'') : null,
|
||||
hwstate: hwstate,
|
||||
otpemail: otpemail,
|
||||
otpsms: otpsms,
|
||||
twoFactorCookieDays: twoFactorCookieDays,
|
||||
authStrategies: authStrategies.join(','),
|
||||
loginpicture: (typeof domain.loginpicture == 'string')
|
||||
}, req, domain, (domain.sitestyle == 2) ? 'login2' : 'login'));
|
||||
}
|
||||
|
||||
// Handle a post request on the root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue