bic-ed / Multiverse

A responsive theme for Zenphoto
https://www.antonioranesi.it/pages/multiverse-zenphoto-theme/
Other
3 stars 3 forks source link

Cannot open albums protected by password with blank user #9

Closed Cilyan closed 2 years ago

Cilyan commented 3 years ago

The script forces the "required" attribute on the user input. However, when albums are simply protected by a password, one can choose to leave the user blank. This configuration is compatible with "basic" theme.

https://github.com/bic-ed/Multiverse/blob/a85c90bd0c3c436906a9de5284deef13cefa3131/multiverse/js/main.js#L877

Due to the "required" attribute forced onto the input, there is no way to input the password only and leave the user blank. as such, there is no way to access the album.

bic-ed commented 3 years ago

Hi @Cilyan, thanks for reporting this, I'll have a deeper look into it asap, but as far as I remember it should be possible to set user and password for albums without the need of having an account at all. That should solve your problem, but just to be sure I'll test it as soon as I can. I'm out of town right now, sorry.

bic-ed commented 3 years ago

I realize now that I was answering to the first version of your comment, before your editing:

(which defeats the purpose of simply locking the album with a password).

Now I see that you would actually like to have the possibility to leave blank the user field. I'm unsure if that possibility is a wanted feature of Zenphoto, can @acrylian or @fretzl confirm it? I was not even aware it was possible. Anyway I think that wherever an user field is present, it is supposed to be filled. You could just set it to "guest" or whatever you like and pass it to your visitors along with the password. It is surely easier doing so for you than change the script is for me.

acrylian commented 3 years ago

I'm unsure if that possibility is a wanted feature of Zenphoto, can @acrylian or @fretzl confirm it?

It is indeed possible and intended. If it is actually a good idea I am not really sure right now. I would at least always recommend to set a guest user as well as it raises the protection a bit.

Cilyan commented 3 years ago

In other gallery software, folders that are password protected are generally only protected by a password. It even only displays a field for password. As Zenphoto came in my case as a replacement (still in evaluation) for a previous gallery software, the people using the platform are used to only inputting a password. I was myself really puzzled by the way it works in Zenphoto, because I did not expect that the folder could be protected by a user name in addition to the password (probably because it was not the case on the previous SW), and the french translation is very confusing. Indeed, the translation for (what I guess is) "guest user" is "Invité de l'album", which is somewhat okay, but can be misunderstood with "Invite de l'album" (see the différence ? :) ), which means "album prompt". So my first attempt was to fill this field with something like "Please enter the password you received by mail"... which would be a complicated guest user name!! I understood my mistake late (which explains why I changed the title and text of the issue later).

In any case, the current situation is that Zenphoto allows a blank user as guest, that it works with the default theme, but when you change your theme the access to the album stops working. This is clearly not desired and makes it feel like the theme is broken.

You could just set it to "guest" or whatever you like and pass it to your visitors along with the password. It is surely easier doing so for you than change the script is for me.

I removed the "required": true manually from the multi.js . Software shall bend to my needs, not the other way around :) The server side will catch if there are missing fields.

acrylian commented 3 years ago

Sorry for the French translation confusion but that is out of our hands as I don't understand French at all. Perhaps the Frech translator @vincent3569 can help here.

bic-ed commented 3 years ago

Ok, I introduced the "required" attribute to avoid useless requests to the server where there is an obvious need to fill fields, but since Zenphoto allows an empty user field for password protected albums (and perhaps pages and news as well), I will remove that attribute starting from the next version of Multiverse, so I'm reopening this issue as a reminder. This will not happen any soon though, since I'll be far from my development PC at least till September.

bic-ed commented 2 years ago

Removed the required attribute a4d711503da870c2cf2e80508afffd641ed3239d The new release of Multiverse will follow the release of Zenphoto v1.6.