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

DataUriNormalizer does not recognize valid mime types #20225

Closed
alekitto opened this issue Oct 15, 2016 · 2 comments

Comments

Projects
None yet
6 participants
@alekitto
Copy link
Contributor

commented Oct 15, 2016

DataUriNormalizer denormalize method uses a regex to validate a data uri, but fails to recognize some valid mime types, such as:

application/shf+xml
application/resource-lists+xml
application/java-archive
application/vnd.ms-word.document.macroenabled.12
x-conference/x-cooltalk
@Nek-

This comment has been minimized.

Copy link
Contributor

commented Oct 16, 2016

@alekitto could you provide a case (with a file) so we can reproduce ?

@alekitto

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2016

I've uploaded two test files in this gist: https://gist.github.com/alekitto/364d727f31ebb179f96a3215fe3703cd

The test files are:
test.docm with type application/vnd.openxmlformats-officedocument.wordprocessingml.document
hello.jar with type application/java-archive

dunglas added a commit to dunglas/symfony that referenced this issue Oct 24, 2016

dunglas added a commit to dunglas/symfony that referenced this issue Oct 25, 2016

fabpot added a commit that referenced this issue Nov 11, 2016

bug #20286 [Serializer] Fix DataUriNormalizer's regex (dunglas)
This PR was squashed before being merged into the 3.1 branch (closes #20286).

Discussion
----------

[Serializer] Fix DataUriNormalizer's regex

| Q | A |
| --- | --- |
| Branch? | 3.1 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #20225 |
| License | MIT |
| Doc PR | n/a |

Commits
-------

5dc5dc8 [Serializer] Fix DataUriNormalizer's regex

@fabpot fabpot closed this Nov 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.