Merge pull request #11784 from overleaf/jel-saml-log

[web] Only log SAMLResponse on error

GitOrigin-RevId: 4bc33fadf49d148fd089bf45f87dfce6b0f268c3
This commit is contained in:
Jessica Lawshe 2023-03-08 08:43:24 -06:00 committed by Copybot
parent 4380f20f08
commit db4d9f0562

View file

@ -41,10 +41,14 @@ function log(req, data, samlAssertion) {
samlLog.samlAssertion = JSON.stringify(samlAssertionForLog)
}
if (data.error || samlAssertion) {
if (data.error) {
data.body = {}
if (req.body.email) data.body.email = req.body.email
if (req.body.SAMLResponse) data.body.SAMLResponse = req.body.SAMLResponse
if (req.body.email) {
data.body.email = req.body.email
}
if (req.body.SAMLResponse) {
data.body.SAMLResponse = req.body.SAMLResponse
}
}
try {