Visualizzazione dei risultati da 1 a 3 su 3

Discussione: [zf] Zend_auth salting

  1. #1

    [zf] Zend_auth salting

    Ciao.
    Qc mi sa dire perchè non funziona

    Codice PHP:
    $authAdapter = new Zend_Auth_Adapter_DbTable(
        
    $db,
        
    'usersmy',
        
    'username',
        
    'password',
        
    "MD5(CONCAT('yoursalt' , ?, password_salt))" 
        
    ); 
    SQL

    Codice PHP:
    CREATE TABLE IF NOT EXISTS `usersmy` (
      `
    idint(11NOT NULL auto_increment,
      `
    usernamevarchar(50NOT NULL,
      `
    passwordvarchar(50NOT NULL,
      `
    password_saltvarchar(50NOT NULL,
      `
    real_namevarchar(100NOT NULL,
      
    PRIMARY KEY  (`id`),
      
    UNIQUE KEY `username` (`username`)

    --
    -- 
    Dumping data for table `usersmy`
    --

    INSERT INTO `usersmy` (`id`, `username`, `password`, `password_salt`, `real_name`) VALUES
    (1'rob''760061f6bfde75c29af12f252d4d3345''yoursalt''rob rob'); 
    Se volete qc info in + basta dirlo


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    Così funziona

    Codice PHP:
     $authAdapter = new Zend_Auth_Adapter_DbTable(
        
    $db,
        
    'usersmy',
        
    'username',
        
    'password',
        
    "MD5(CONCAT(?,'yoursalt'))" 
        
    ); 
    In fase di registrazione faccio

    Codice PHP:
    md5('rob'.'yoursalt'); 
    cioè username + salt

    ma PP la reference
    http://framework.zend.com/manual/en/...r.dbtable.html
    segue il primo
    modo mi perdo qc ?
    Qualunque link o esempio è molto apprezzato.


    PS

    Secondo me è meglio mettere
    la password + salt con hash md5
    direttamente nel campo password
    a che pro utilizzare due campi

    Che ne pensate ?
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  3. #3
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.