-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Need ValidateMedia function #17864
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
Comments
Where & Why do you need it? |
Admincontroller of Media the virus file can be changed to required extension to be uploaded manually and easily |
So, how can you validate it? |
There are many ways I guess. So in the method I will create a event handlers to leave it to different developers for different purposes |
How is this different to #17842? |
this happens at !allowedExtensions.Contains(extension) which is before #17842 which happens at eventHandler |
That doesn't yet happen anywhere, since it's a proposal; the new event handler can be run anywhere where we see fit. |
#17842 original purpose is to sanitize svg which should happen at mediaCreatingEventHandler.MediaCreatingAsync. |
If we add any sanitization/validation logic, it'll run for all files, not just SVG ones. So, it'll cover this scenario as well. Please add any further details there. Closing as duplicate. |
Is your feature request related to a problem?
!allowedExtensions.Contains(extension) is too simple (in Admincontroller of Media
Describe the solution you'd like
Change it to bool ValidateMedia(extention, stream)
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: