zenphoto forums » General Zenphoto Discussion

Album password not working properly

(16 posts)
  1. elrol

    Member
    Joined: Jan '09
    Posts: 42

    I am using : version 1.4.1.6 [8326](fresh install) and I am having issues setting an album password for private viewing.

    Once I set the password in Admin and then try the password on that album in another browser, I am never allowed into the album. I just keep seeing the password entry page.

    Any help would be appreciated. I can provide links and passwords to the devs to test if needed.

    Posted 1 year ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    What are your site settings? Do you have passwords on more than just one album, for instance, on the gallery?

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  3. elrol

    Member
    Joined: Jan '09
    Posts: 42

    I only have put a password on one gallery. I do not have a global gallery password. Please see here

    http://order.stein-photos.com/ and you will see the Gallery for the Lloyd Family is password protected

    go to that gallery and put in the pass 'test'

    when I do that here, I am taken to the Zenphoto admin login page and can never see the gallery.

    Posted 1 year ago #
  4. elrol

    Member
    Joined: Jan '09
    Posts: 42

    When looking at the source code of the page that is asking for the album password, I see this hidden form element

    <input type="hidden" name="redirect" value="/zp-core/admin.php" />

    that could explain why it keeps redirecting me to the admin sign in page.

    Posted 1 year ago #
  5. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    Well, yes, if that is the redirect it would take you to the admin logon, not the gallery page.

    Since you are running a custom theme, check to be sure you have not got any deprecated errors. If the theme is supplying the password form it may be incorrect.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  6. elrol

    Member
    Joined: Jan '09
    Posts: 42

    I do not think my custom theme is supplying the password form.

    Where would I see that?

    I do not have any code for this type of form in my custom theme.

    Posted 1 year ago #
  7. elrol

    Member
    Joined: Jan '09
    Posts: 42

    looking deeper at this

    I see that the printLoginForm on password.php is passing NULL for the redirect.

    <?php $_zp_authority->printLoginForm(NULL, true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>

    and then on lib_auth.php lines 768 - 770 - if redirect is NULL, then redirect is set to point to the admin login.

    hope this helps.

    Not sure how to fix this though.

    Posted 1 year ago #
  8. elrol

    Member
    Joined: Jan '09
    Posts: 42

    Changing NULL to $_SERVER['PHP_SELF'] on pasword.php does not work either. That sends the user back to /index.php as that is the page calling the overall scripts.

    I am still playing with this, to see if I can figure out the proper $server variable to use

    Posted 1 year ago #
  9. elrol

    Member
    Joined: Jan '09
    Posts: 42

    Got it to work .. at least for what I need it for.

    Change :

    <?php $_zp_authority->printLoginForm(NULL, true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>

    To :

    <?php $_zp_authority->printLoginForm($_SERVER['REQUEST_URI'], true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>

    Posted 1 year ago #
  10. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    SO your theme does not have a password.php and is using the default one? Or if it does, then it is not using the printPasswordForm() template function.

    You should try with an unmodified install/distributed theme and see if there is a problem with that combination.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  11. elrol

    Member
    Joined: Jan '09
    Posts: 42

    No, My theme does not have a password.php file (though I may look into this). I should try as you ask, with an official Zen theme.

    Thanks

    Posted 1 year ago #
  12. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    The default password.php does not use the printPasswordForm($hint, $show); function (which it probably should.) You can copy the script from the zp-core function to your theme and change the code to use printPasswordForm. This should fix the problem.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  13. n20capri

    Contributor
    Joined: Nov '09
    Posts: 121

    I'm running into the same issue...not the redirect issue but the not being able to view the gallery once password is entered issue. It keeps telling me "There was an error logging in. Check password and try again."

    I'm running a custom theme but the stock themes aren't working either...won't let me login.

    I even tried elrol's change this to that but it didn't work either. Recent upgrade to 1.4.3. I have another 1.4.3 install and that works fine. What do I need to copy from that to make the other one work?

    Thanks,
    Mike

    Posted 9 months ago #
  14. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    The two installs should be identical if they are both 1.4.3.

    You should upgrade to the 1.4.3.1 release. Then you will need to re-save any album passwords that were created on the 1.4.3 base release.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  15. n20capri

    Contributor
    Joined: Nov '09
    Posts: 121

    Upgrading to 1.4.3.1 worked - not sure why the last upgrade to 1.4.3 didn't but either way.

    Thanks

    Posted 9 months ago #
  16. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    There is a bug in 1.4.3 which caused the password to be double encrypted before storing. All such stopred passwords will necessarily fail.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.