Stack Trace Exposure (ARCH9127)
Esta página aún no está disponible en tu idioma.
Key swift.security.stack-trace-exposure · Severity warning · Category security · CWE CWE-209
Flags error descriptions or call stacks written into an HTTP response (Abort(reason: "\(error)"), Thread.callStackSymbols in a body).
Incorrect
Section titled “Incorrect”throw Abort(.internalServerError, reason: "\(error)")Correct
Section titled “Correct”req.logger.error("\(error)")throw Abort(.internalServerError, reason: "internal_error")Log the error; answer with a generic message and a correlation id.