[APIP] Formatting values (FILTER_SANITIZE_URL) #17728
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
30b2e04 to
d0ee4e1
Compare
8870a2f to
ce59fe5
Compare
src/Sylius/Bundle/ApiBundle/Converter/IriToIdentifierConverter.php
Outdated
Show resolved
Hide resolved
| return false; | ||
| } | ||
|
|
||
| $fieldValue = filter_var($fieldValue, FILTER_SANITIZE_URL); |
There was a problem hiding this comment.
As far as I understand, it will only cleanup field data for IRI conversion and full comment (from example) will go into DB?
Sanitize option doesn't do validation and always will return what have been supplied (int, invalid url strings), but my only concern is support for non-latin paths.
Sanitize the string by remove all characters except
latin letters
https://www.php.net/manual/en/filter.constants.php#constant.filter-sanitize-url
There was a problem hiding this comment.
As far as I understand, it will only cleanup field data for IRI conversion and full comment (from example) will go into DB?
yes exactly.
Sanitize option doesn't do validation and always will return what have been supplied (int, invalid url strings), but my only concern is support for non-latin paths.
Could you please give an example of what url's you mean ?
|
Hi @christopherhero, Any update regarding this PR? Cheers 🍻 |
…ndle\Converter\IriToIdentifierConverter::isIdentifier($fieldValue)` (fix after -> symfony/http-foundation@168b77c71)
Hi, @NoResponseMate |
ce59fe5 to
2ae2a47
Compare
2ae2a47 to
e9e539d
Compare
…ted to url validation
e9e539d to
aa52620
Compare
|
Thank you @christopherhero! 🎉 |
resolves #17727
The problem occurs in all API commands that implement
Sylius\Bundle\ApiBundle\Command\IriToIdentifierConversionAwareInterface.