Opened 6 years ago

Last modified 6 years ago

#1697 closed Bug/Fehler

Passwort-Feld erweitern in Datenbankstruktur-Update wurde auskommentiert — at Version 2

Reported by: anonymous Owned by: somebody
Priority: normal Milestone: modified-shop-2.0.5.0
Component: Admin Version: 2.0.4.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Torsten Riemer)

In der Datei: update_1.0.6.4_to_2.0.0.0.sql wurde die Zeile die dafür sorgt, dass das Passwortfeld auf 60 Zeichen erweitert wird, auskommentiert:

#Web28 - 2014-03-20 CHANGE password LENGTH
#ALTER TABLE customers MODIFY customers_password VARCHAR(60) NOT NULL; # NOT needed any more WITH the NEW /inc/xtc_validate_password.inc.php

Das führt dazu, das bei einem Update aus einem alten Shop mit zB nur 40 Zeichen, die Passwörter nicht korrekt gespeichert werden und man sich nicht mehr einloggen kann.

Siehe auch:
Nur einmal einloggen möglich, danach ungültige E-Mail/Passwort-Kombination!?

Change History (2)

comment:1 by anonymous, 6 years ago

Duplikat von #1559

comment:2 by Torsten Riemer, 6 years ago

Description: modified (diff)
Milestone: modified-shop-2.0.5.0

Das kann eigentlich nicht sein, dass das Passwort-Feld nur 40 Zeichen lang ist, denn folgenden Code in der Datei "/_installer/includes/auth.php" sorgt bereits seit Shopversion 2.0.2.1 dafür, dass das Feld entsprechend auf 60 Zeichen erweitert wird:

        // check if email exists
        $check_customer_query = xtc_db_query("SELECT customers_id, 
                                                     customers_password
                                                FROM ".TABLE_CUSTOMERS." 
                                               WHERE customers_email_address = '".xtc_db_input($email_address)."' 
                                                 AND customers_status = '0'
                                                 AND account_type = '0'");

        if (xtc_db_num_rows($check_customer_query) > 0) {
          // change password field
          xtc_db_query("ALTER TABLE ".TABLE_CUSTOMERS." MODIFY customers_password varchar(60) NOT NULL");

          // Check that password is good
          $check_customer = xtc_db_fetch_array($check_customer_query);      
          if (xtc_validate_password($password, $check_customer['customers_password'], false) !== true) {
            return false;
          }
        } else {
          return false;
        }

Siehe dazu auch Tickets #1120 & #1186.

Wir schauen uns das aber gerne nochmal an, wobei ich dieses Ticket nun erstmal als Duplikat von Ticket #1559 schließe.

Last edited 6 years ago by Torsten Riemer (previous) (diff)
Note: See TracTickets for help on using tickets.