Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Masking Behavior When SILKY_SENSITIVE_KEYS is Empty #776

Closed
ahsanshafiq742 opened this issue Mar 6, 2025 · 1 comment · Fixed by #777
Closed

Incorrect Masking Behavior When SILKY_SENSITIVE_KEYS is Empty #776

ahsanshafiq742 opened this issue Mar 6, 2025 · 1 comment · Fixed by #777
Assignees

Comments

@ahsanshafiq742
Copy link
Contributor

In Django Silk, when SILKY_SENSITIVE_KEYS is set as an empty dictionary ({}), the expected behavior is that no values in the request body and headers should be masked, since masking should only apply to keys explicitly listed under SILKY_SENSITIVE_KEYS.

However, instead of allowing all request body values to remain visible, Django Silk incorrectly masks everything in the request body.

Expected Behavior:
If SILKY_SENSITIVE_KEYS is empty ({}), Django Silk should not mask any values in the request body.

Actual Behavior:
When SILKY_SENSITIVE_KEYS = {}, all request body values are masked, which is incorrect.

Steps to Reproduce:

  • Set SILKY_SENSITIVE_KEYS = {} in Django settings.
  • Make an API request with a request body containing various key-value pairs.
  • Observe that all values in the request body are masked in the Django Silk logs, even though no keys are
    specified for masking.
  • This issue affects data visibility in logs and may lead to unexpected debugging challenges.
@ahsanshafiq742
Copy link
Contributor Author

I’d like to work on this issue. Can it be assigned to me?

@ahsanshafiq742 ahsanshafiq742 self-assigned this Mar 7, 2025
@ahsanshafiq742 ahsanshafiq742 linked a pull request Mar 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant