Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Validator: fix FileValidator when value is an UploadedFile #47921

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

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Oct 19, 2022

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
Doc PR n/a

The code I introduced in #47710 is currently broken if the file to validate is a UploadedFile instance, as we must check the original extension of the file submitted by the client, not the one (that doesn't exist) of the temporary file created on the server by PHP.

This patch fixes the issue.

@xabbuh
Copy link
Member

xabbuh commented Oct 19, 2022

Can we update the tests to avoid future regressions?

@dunglas
Copy link
Member Author

dunglas commented Oct 19, 2022

@xabbuh done!

@fabpot fabpot force-pushed the fix/uploaded-file branch from c94273e to e24ef9d Compare October 20, 2022 07:15
@fabpot
Copy link
Member

fabpot commented Oct 20, 2022

Thank you @dunglas.

@fabpot fabpot merged commit 6e36c4e into symfony:6.2 Oct 20, 2022
@dunglas dunglas deleted the fix/uploaded-file branch October 20, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.