Skip to content

Conversation

@mmcev106
Copy link
Collaborator

@mmcev106 mmcev106 commented Dec 5, 2022

The urlencode() function currently escapes all taints. I suspect it should only escape html & has_quotes taints. Here's an example where a taint should likely be reported, but is not:

https://psalm.dev/r/4c72d132a4

This PR attempts to fix this. Don't hesitate to let me know if I'm missing anything, or if you have any concerns.

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/4c72d132a4
<?php // --taint-analysis
system(urlencode($_GET['a']));
Psalm output (using commit 1cd10c3):

No issues!

@weirdan weirdan added the release:fix The PR will be included in 'Fixes' section of the release notes label Dec 6, 2022
@weirdan weirdan merged commit 4dc969b into vimeo:master Dec 6, 2022
@weirdan
Copy link
Collaborator

weirdan commented Dec 6, 2022

Thanks!

@mmcev106 mmcev106 deleted the urlencode branch December 28, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix The PR will be included in 'Fixes' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants