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

Adjust sanitization of PHP file extensions in FileAdder.php #3681

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

rmdavi
Copy link
Contributor

@rmdavi rmdavi commented Jul 25, 2024

I recently noticed sporadically failing tests in my application after the addition of PHP extensions to the defaultSanitizer() function of FileAdder.php.

Digging into the issue, it turns out the tempnam() call in addMediaFromBase64() of InteractsWithMedia.php was occasionally ending the file name string with PHp which was blocked by the PHP extension check.

This PR proposes to add the . to all $phpExtensions in the list to resolve the issue.

@freekmurze
Copy link
Member

Nice, thank you!

@freekmurze freekmurze merged commit 91a0aae into spatie:main Jul 26, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants