Sfoglia il codice sorgente

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

[web] Only log SAMLResponse on error

GitOrigin-RevId: 4bc33fadf49d148fd089bf45f87dfce6b0f268c3
Jessica Lawshe 3 anni fa
parent
commit
db4d9f0562

+ 7 - 3
services/web/app/src/Features/SamlLog/SamlLogHandler.js

@@ -41,10 +41,14 @@ function log(req, data, samlAssertion) {
       samlLog.samlAssertion = JSON.stringify(samlAssertionForLog)
       samlLog.samlAssertion = JSON.stringify(samlAssertionForLog)
     }
     }
 
 
-    if (data.error || samlAssertion) {
+    if (data.error) {
       data.body = {}
       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 {
     try {