Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

filters: Do not report AVATAR_SALT, or other salts.

Alex Vandiver75cf33079ac1
diff --git a/zerver/filters.py b/zerver/filters.py
index 73caf381401..68f42c6490f 100644
--- a/zerver/filters.py
+++ b/zerver/filters.py
@@ -1,3 +1,4 @@
+import re
from typing import Any
from django.http import HttpRequest
@@ -6,6 +7,11 @@ from typing_extensions import override
class ZulipExceptionReporterFilter(SafeExceptionReporterFilter):
+ # Add _SALT to the standard list
+ hidden_settings = re.compile(
+ r"API|TOKEN|KEY|SECRET|PASS|SIGNATURE|HTTP_COOKIE|_SALT", flags=re.IGNORECASE
+ )
+
@override
def get_post_parameters(self, request: HttpRequest | None) -> dict[str, Any]:
post_data = SafeExceptionReporterFilter.get_post_parameters(self, request)