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

No error when passing an user-controlled array into an extract call #10394

Closed
cgocast opened this issue Nov 22, 2023 · 2 comments
Closed

No error when passing an user-controlled array into an extract call #10394

cgocast opened this issue Nov 22, 2023 · 2 comments

Comments

@cgocast
Copy link
Contributor

cgocast commented Nov 22, 2023

Psalm raises no error when analysis this sample : https://psalm.dev/r/5738c5401d

Documentation about extract function warns : "Do not use extract() on untrusted data, like user input (e.g. $_GET, $_FILES)."

I'll write a PR to fix this issue.

Copy link

I found these snippets:

https://psalm.dev/r/5738c5401d
<?php //--taint-analysis

$array = $_GET;
extract($array);
Psalm output (using commit 5095f4e):

No issues!

This was referenced Nov 22, 2023
@weirdan
Copy link
Collaborator

weirdan commented Feb 10, 2024

Fixed in #10417

@weirdan weirdan closed this as completed Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants