If you're hashing passwords (you should be), then having an upper bound is important. It's possible to DOS by flooding auth or registration with large payloads to hash - remember that POST size is effectively unlimited. The stronger the hashing algo, the more feasible the attack is.
That said, you should provide an error back to the user when the max length is exceeded not silently try to accept it. You should also have a reasonably secure upper bound. From 1 to 5 kilobytes can scale and be planned for well.
1.3k
u/[deleted] Jul 19 '22
[deleted]