-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
BUnitBrowserFile ignores MaximumAllowedFileSize #1503
Comments
Hey @MorneZaayman That is a fair point. That said - I will provide a fix that will throw in your described case. |
Dankeschön. Wow PR already up - you're fast! |
Sehr gern. We could release a pre-release if you want - depending on your policy. |
I appreciate it, but there's no need for that, as long as it won't be months before it is released. We have some other work to complete before this goes live anyway, so we can deal with the failing test in the meantime. |
No I don't think so - @egil It might make sense to release even that version as we patch the CVE in STJ as well. |
Let's do it @linkdotnet. Send a release out. |
Version 1.30 is out @MorneZaayman - This includes the new fix |
Thanks for the quick turnaround. Sorry for the delay in getting back to you - I was away on leave and then catching up when I returned. I've tested with the latest release and it's working perfectly 👍🏻. |
When testing the
MaximumAllowedFileSize
for a component that includes anInputFile
component, I picked up that theBUnit.BUnitBrowserFile
implementation ignores theMaximumAllowedFileSize
argument, and allows any file size to be uploaded.To replicate, you need to render a component containing an
InputFile
component (or theInputFile
component directly), and set theMaximumAllowedFileSize
to something small, say 512 (bytes). Then generate a random file containing say 1024 bytes and upload it. TheBUnitBrowserFile
implementation allows the file to be uploaded.Expected behavior:
The
BUnitBrowserFile
implementation throws an exception just like the built in BlazorInputFile
component does.Version info:
The text was updated successfully, but these errors were encountered: