mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 12:58:11 +03:00
CRITICAL: Fix bug where req.body was accidentally mutated
This commit is contained in:
@@ -24,7 +24,7 @@ export const RequestLoggerMiddleware: RequestHandler = (req, res, next) => {
|
||||
// still, i don't like it.
|
||||
|
||||
const safeBody = Object.prototype.hasOwnProperty.call(req.body, "password")
|
||||
? Object.assign(req.body, { password: "[OMITTED]" })
|
||||
? Object.assign({}, req.body, { password: "[OMITTED]" })
|
||||
: req.body;
|
||||
|
||||
logger.debug(`Received request ${req.method} ${req.url}.`, {
|
||||
|
||||
Reference in New Issue
Block a user