mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed server exception on older NodeJS versions, #4102
This commit is contained in:
parent
69636342fb
commit
cfd8521381
2 changed files with 281 additions and 53 deletions
|
@ -7697,8 +7697,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||
xargs.autocomplete = (domain.autocomplete === false)?'x':'autocomplete'; // This option allows autocomplete to be turned off on the login page.
|
||||
if (typeof domain.hide == 'number') { xargs.hide = domain.hide; }
|
||||
|
||||
// To mitigate any possible BREACH attack, we generate a random length string here.
|
||||
xargs.randomlength = (args.webpagelengthrandomization !== false) ? parent.crypto.randomBytes(parent.crypto.randomInt(0, 256)).toString('base64') : '';
|
||||
// To mitigate any possible BREACH attack, we generate a random 0 to 255 bytes length string here.
|
||||
xargs.randomlength = (args.webpagelengthrandomization !== false) ? parent.crypto.randomBytes(parent.crypto.randomBytes(1)[0]).toString('base64') : '';
|
||||
|
||||
return xargs;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue