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

[5.5] Ignore svg's in validateDimensions() #21359

Closed
wants to merge 1 commit into from
Closed

Conversation

tobz-nz
Copy link
Contributor

@tobz-nz tobz-nz commented Sep 24, 2017

SVG dimensions are pretty irrelevant, so they should simply pass this test.

If this approach is too simple, we could check against the svg's width/height or viewBox attributes to do an actual size test. Although this is probably not valid in some cases (a sprite svg with many <symbol>'s of different sizes for example)

SVG dimensions are pretty irrelevant, so they should simply pass this test.
@GrahamCampbell GrahamCampbell changed the title Ignore svg's in validateDimensions() [5.5] Ignore svg's in validateDimensions() Sep 24, 2017
@Kyslik
Copy link
Contributor

Kyslik commented Sep 24, 2017

What happens if file has no "ext" but mime is svg?

@m1guelpf
Copy link
Contributor

@tobz-nz I believe this is a breaking change, as it will change the way validation affects an uploaded svg file.

@tobz-nz
Copy link
Contributor Author

tobz-nz commented Sep 24, 2017

So the feedback I'm taking from your comments is:

  • change the logic to check mimetype instead of extension
  • PR to the master branch

Is this correct?
Just a little unclear on steps forward.

@m1guelpf
Copy link
Contributor

You should definitely send this to the master branch.

@tobz-nz
Copy link
Contributor Author

tobz-nz commented Sep 25, 2017

The master branch has not been updated in 3 years... is it really the right branch to PR to?

@tobz-nz
Copy link
Contributor Author

tobz-nz commented Sep 25, 2017

Created new PR #21390 to the master branch, with the check changed to match the mimeType.

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.

4 participants