1
0
Fork 0
forked from svrjs/svrjs

Fix server string not displaying in the bad request response.

This commit is contained in:
Dorian Niemiec 2024-08-25 11:55:42 +02:00
parent 60615cdb5a
commit 314cf247d4

View file

@ -288,16 +288,15 @@ function clientErrorHandler(err, socket) {
)
.replace(
/{server}/g,
"" +
(
config.generateServerString() +
(!config.exposeModsInErrorPages || extName == undefined
? ""
: " " + extName)
)
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;"),
(
config.generateServerString() +
(!config.exposeModsInErrorPages || extName == undefined
? ""
: " " + extName)
)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;"),
)
.replace(
/{contact}/g,
@ -341,16 +340,15 @@ function clientErrorHandler(err, socket) {
)
.replace(
/{server}/g,
"" +
(
config.generateServerString() +
(!config.exposeModsInErrorPages || extName == undefined
? ""
: " " + extName)
)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;"),
(
config.generateServerString() +
(!config.exposeModsInErrorPages || extName == undefined
? ""
: " " + extName)
)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;"),
)
.replace(
/{contact}/g,
@ -409,10 +407,11 @@ function clientErrorHandler(err, socket) {
)
.replace(
/{server}/g,
(config.generateServerString() +
(config.exposeModsInErrorPages || extName == undefined)
? ""
: " " + extName
(
config.generateServerString() +
(!config.exposeModsInErrorPages || extName == undefined
? ""
: " " + extName)
)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")