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

[11.x] Trim invisible characters #50832

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

dasundev
Copy link
Contributor

This PR addresses the issue where invisible characters are not trimmed during HTTP requests, which can cause problems when submitting forms. Users may include invisible characters to simply fill the input, resulting in a poor user experience.

Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taylorotwell Although this may be considered a breaking change, we've just faced this issue on https://pinkary.com/ and I would kind of expect this TrimStrings to deal with it.

@taylorotwell taylorotwell merged commit ade3b6b into laravel:11.x Mar 29, 2024
30 checks passed
patrickomeara added a commit to patrickomeara/framework that referenced this pull request Mar 29, 2024
patrickomeara added a commit to patrickomeara/framework that referenced this pull request Mar 29, 2024
taylorotwell pushed a commit that referenced this pull request Apr 1, 2024
* Add trim method to Str to remove unicode space characters

* Add ltrim and rtrim methods

* Comments

* styleCI patch

* Assert that new lines are removed

* Handle binary data

* Use in middleware

* Implement @dasundev's changes from #50832
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.

None yet

3 participants