Skip to content

Conversation

@DAQEM
Copy link

@DAQEM DAQEM commented Feb 4, 2026

This PR fixes a logic bug in the iframe src sanitizer where allowed query parameters (e.g., start, end, id) were being incorrectly stripped.

The Issue:
Previously, newSearchParams was initialized as an empty object. The filtering loop attempted to delete disallowed keys from this already empty object, which had no effect. Consequently, the final url.search was always set to an empty string, removing all parameters.

The Fix:
We now initialize newSearchParams with the existing parameters from the URL. This ensures that the .delete() operation correctly removes only the disallowed parameters while keeping the allowed ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant