-
Notifications
You must be signed in to change notification settings - Fork 40
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
False positive for ProperEscapingFunction.hrefSrcEscUrl when attribute with action in name is used #669
Comments
Thanks for reporting this. Two notes:
Could you provide a more complete code sample for the second test case ? |
|
<img
srcset="
/wp-content/uploads/flamingo4x.jpg 4025w,
/wp-content/uploads/flamingo3x.jpg 3019w,
/wp-content/uploads/flamingo2x.jpg 2013w,
/wp-content/uploads/flamingo1x.jpg 1006w
"
src="/wp-content/uploads/flamingo-fallback.jpg"
> |
Either way, PR #670 should fix the issue you originally reported about the |
@jrfnl sorry to add one to this, but there is one more:
Also reports the above error, even though that clearly isn't an HTML attribute. Has this been fixed with the new PR? |
@kkmuffme It does appear to not be fixed in 2.3.1, can you please open a new issue since this is separate? Thank you for reporting! |
Thanks done #680 |
Bug Description
The above sniff is extremely prone to false positives, as it just checks for action/src/href, but should be at least be more specific for action.
Minimal Code Snippet
Error Code
Wrong escaping function. href, src, and action attributes should be escaped by
esc_url()
, not byesc_attr()
.WordPressVIPMinimum.Security.ProperEscapingFunction.hrefSrcEscUrl
Environment
Use
php -v
andcomposer show
to get versions.Tested Against
master
branch?master
branch of VIPCS.develop
branch of VIPCS.The text was updated successfully, but these errors were encountered: