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

Tighten down the ZMI frame source logic to only allow site-local sources #1151

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

dataflake
Copy link
Member

The ZMI frame logic uses a request variable came_from to determine the source location for the right-hand side frame when JavaScript is disabled. This can be passed in via query string, which means it's out of our control and must be sanity-checked. Only site-local pages should load into that frame.

Copy link
Contributor

@drfho drfho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dataflake dataflake merged commit 9bc4959 into master Sep 11, 2023
23 checks passed
@dataflake dataflake deleted the dataflake/zmi_came_from branch September 11, 2023 06:26
Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing some possible problems still, although they could be theoretical: I have a test case that accepts a came_from that should not be accepted, but in a browser nothing goes wrong yet.
I will try to come up with a PR today.

@dataflake
Copy link
Member Author

Please do. The way the code is written now it should be easy to add additional cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants