You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name length check mirrors the one just beneath the other Just (_ct, name, Nothing) case and that's for the parameter name. There's no code right now that checks the file name length, so the error itself seems unused.
The text was updated successfully, but these errors were encountered:
Now that I'm looking at it, the UrlEncoded variant of conduitRequestBodyEx doesn't check the parameter name lengths at all. Either both should or neither should. The current method of just checking param name lengths of multipart forms is odd. Doesn't gain nor protect much. I think just checking the header line length is sufficient to protect against metadata (such as param name, file name) resource abuse. Individual param name and filename length checks should be left to business logic.
Good point. That logic is obviously conflating two separate things.
Let's see if anyone else has strong opinions about this. I personally also feel a "header length" check is sufficient.
I also don't really get why this exists. This module is only imported in RequestLogger and then only a handful of things. I wonder if anyone would directly use this module 🤔
Hey,
I think the
FilenameTooLong
error in Wai Parse is incorrectly thrown for a too long key name, not the file name.wai/wai-extra/Network/Wai/Parse.hs
Lines 583 to 589 in 53da27d
The
name
length check mirrors the one just beneath the otherJust (_ct, name, Nothing)
case and that's for the parameter name. There's no code right now that checks the file name length, so the error itself seems unused.The text was updated successfully, but these errors were encountered: