-
Notifications
You must be signed in to change notification settings - Fork 35
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
Include a way to get request variables without sanatization #2232
Include a way to get request variables without sanatization #2232
Conversation
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.
The code is good. I would prefer seeing another method though tribe_get_request_var_raw
which would be used inside tribe_get_request_var
, rather than a new parameter.
In most cases where we want a get param to check its value, we want to use the tribe_get_request_var_raw
, if what we want to get needs to be saved or displayed we need tribe_get_request_var
:D
Co-authored-by: Dimitrios Pantazis <[email protected]>
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.
Small tweaks and maybe less phpcs noise?
src/functions/utils.php
Outdated
} | ||
|
||
if ( isset( $_POST ) ) { | ||
$requests[] = (array) $_POST; | ||
$requests[] = (array) $_POST; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended |
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.
Just disable at the beginning of the function and re-enable at the end?
i.e
function tribe_get_request_var_raw() {
// phpcs:disable
...
// phpcs:enable
}
(can be specific or not here)
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.
The code looks good - Why EVA tests are failing though ?
Co-authored-by: Stephen Page <[email protected]>
🎫 Ticket
TEC-5283
🗒️ Description
Resolves the problem where because we are using
tribe_get_request_var
it will strip all HTML.📹 Artifact
https://i.bordoni.me/Zt3Zk5Bd