Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    help question Upgraded from v1.39h to v1.57c, passwords upgraded too?

    When v1.39h was upgraded to 1.57c, the customers_password entries in the DB were also upgraded
    Given that our Server PHP = 5.6, the passwords should be upgraded by the php password_hash() right?
    More specifically: password_hash($plain, PASSWORD_DEFAULT)

    However, a separate utility which accesses the DB to validate customers, fails because it gets a different result.

    password_hash($entered_password, PASSWORD_DEFAULT) does not match $customers_password in the DB

    When I display the two long strings, they both start the same $2y$10$..... but after that, they are different.

    Was the DB not upgraded with the php password_hash() function?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,696
    Plugin Contributions
    123

    Default Re: Upgraded from v1.39h to v1.57c, passwords upgraded too?

    The upgrade does not modify customers_password other than to extend its length.
    If you want to write password matching logic you'll need to study includes/classes/class.zcPassword.php and use the same techniques.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    Default Re: Upgraded from v1.39h to v1.57c, passwords upgraded too?

    The fix was to use this command: if (password_verify($plain, $customers_password)){

 

 

Similar Threads

  1. Replies: 7
    Last Post: 6 Jan 2022, 08:28 PM
  2. v139h Upgrading from v1.39h to v1.57c, no Upgrade button
    By split63 in forum Upgrading to 1.5.x
    Replies: 8
    Last Post: 5 Jan 2022, 08:17 PM
  3. v139h Recently upgraded from v1.3.9 to v1.5.4
    By Usahog in forum Upgrading to 1.5.x
    Replies: 7
    Last Post: 24 Mar 2015, 09:36 PM
  4. Upgraded from 1.3.8b to 1.3.9H ok
    By incircolo in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 10 Oct 2011, 06:39 PM
  5. upgraded from 1.3.9.f to G, but...
    By highlander in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 4 Jan 2011, 03:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR