Earlier quoted context omitted.
Yep, people who've run marginally popular sites have dealt with this before. Give someone a text box and watch them try to stuff 4GB of content in it. There has to be a cutoff somewhere, but as you note, it should be well outside of the realm of reasonable password lengths (hundreds of characters).
Hash the password locally (you are serving JavaScript over SSL right?) and only send the SHA256.
Requiring me to trust your code in order for you to decide whether or not to trust me is asking too much.