BUG: Share password loses leading/trailing spaces so the password you set doesn't work
Is there an existing issue for this?
- [x] I have searched the existing issues
What happened?
When you share an album with a password, the share dialog quietly removes spaces from the start and end of the password before saving it. The unlock page doesn't remove them, so the exact password you typed is rejected.
Steps to reproduce
- On the Albums page, open an album's ⋯ menu and choose Share.
- Turn on Require a password and enter
test(with a space at the end). - Create the link and open it in a browser.
- Enter
test(the same password, with the space).
###Screencast
https://github.com/user-attachments/assets/04b90379-1357-4579-adaf-d752a5b84361
Expected
The album opens.
Actual
"That password is not right." Entering test without the space opens it, which isn't the password that was set.
Cause
ShareAlbumDialog.tsx sends password.trim() when creating the share. The unlock route checks the password exactly as typed.
Fix
Stop trimming the share password, the same as #1690 did for the Edit Album dialog.
Record
- [x] I agree to follow this project's Code of Conduct
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
Discussions are carried on Discord.
Instead of commenting here, join the AOSSIE Discord server and go to Projects → PictoPy.
If you find this project useful, a GitHub star would be appreciated.
@rohan-pandeyy I want to work on this issue can you please assign it to me?