-
Notifications
You must be signed in to change notification settings - Fork 1
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
150 resolved dynamic-render-path-vulnerability #181
Conversation
887cd32
to
ed56f98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment and let me know what you think. It's fine to merge as is but maybe could be a little cleaner in the render call.
ea237d0
to
4e16c6f
Compare
Is this PR ready for @crowesn's re-review? |
I was holding off on this until we decided how to handle the webpack issue encountered during deploy since I wasn’t sure if we were going to be doing any reverting.. Is it okay to merge more PRs?
|
After Thomas's webpacker PR is merged, I will rebase if necessary and then this should be ready for re-review and merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, merging.
Fixes #150
Fix Dynamic Render Path Vulnerability in PagesController
This PR addresses a security concern raised by Brakeman concerning dynamic render paths in the PagesController. Specifically, Brakeman flagged the use of params[:page] directly in a render call as a potential risk.
Changes:
Refactored PagesController to use a whitelist approach for page rendering.
Added a type check to ensure that params[:page] is a string.
Added test for the whitelist to ensure that future developers do not add a page without adding it to the whitelist.