Closed MorneZaayman closed 4 months ago
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. Otherwise folks might have to do the same just because bUnit uses an old STJ version (due to its dependencies)
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: