Password protection of a gallery wasn't working for me. It appeared that the text in /password.php was including the newline in text for the password. (In fact, since it uses file_get_contents(), it would include all text in all lines of password.php if there were more than one.)
Anyway, I made this hack in libraries/general.functions.php#password_exists() and it seems to work:
< return strip_tags($password);
> return strip_tags(trim($password)); /// chomp eol in $password text
Interested in knowing if there really is a more correct way for getting this to work?