Welcome Guest, Not a member yet? Register   Sign In
Error with the encode password function
#1

[eluser]jgodino[/eluser]
Error with the encode password.

I cannot use the forgot_password function.

We are calling the same function $this->encrypt->encode with the same key and I receiving differents values.

Is is a bug?

Thanks

First call


DEBUG - 2009-07-18 19:14:22 --> Rutine confirm_password. New Key:v2rh8PwW39CL
DEBUG - 2009-07-18 19:14:22 --> Rutine confirm_password. New Key Encode: Codificada:wBLAnPyS7xBRHWRTPTb4Su9sltW8307q7O1OqHc0id80l3A2Nv8JWToNn3KyJ46TZae+dTHweLKEr2IE/KfhHw==

Second call

DEBUG - 2009-07-18 19:17:20 --> - login_routine: PWD Pwd: v2rh8PwW39CL
DEBUG - 2009-07-18 19:17:20 --> - login_routine: PWD Pwd Encode: mgHLDiZ6U/djeZB9DhCNwsBVzoCV9seeE3EfRNnufqkICbVHuRZhYg0wbb5EguqCAdITIbnO0Vncc/+cPmVQdQ==



Javier

Function confirm_password.
--------------------------
login.php


Code:
function confirm_password()
    {
        $this->load->model('clientcontacts_model', '', TRUE);
        $customer_id = (int) $this->uri->segment(3);
        $passkey = $this->uri->segment(4);

        $email = $this->clientcontacts_model->password_confirm($customer_id, $passkey)->row()->email;

        $data['page_title'] = $this->lang->line('login_forgot_password');

        if ($email != FALSE)
        {
            $new_password = random_string('alnum', 12);
            [color=red]$password_crypted = $this->encrypt->encode($new_password);[/color]            
            
            log_message('debug', "Rutine confirm_password. New Key:".$new_password);
            log_message('debug', "Rutine confirm_password. New Key Encode:".$password_crypted);


LOG


Code:
DEBUG - 2009-07-18 19:14:22 --> Rutine confirm_password. New Key:v2rh8PwW39CL
DEBUG - 2009-07-18 19:14:22 --> Rutine confirm_password. New Key Encode: Codificada:wBLAnPyS7xBRHWRTPTb4Su9sltW8307q7O1OqHc0id80l3A2Nv8JWToNn3KyJ46TZae+dTHweLKEr2IE/KfhHw==


Function Log
------------

Site_entry.php


Code:
function login_routine()
    {
        //Initialise the Encryption Library
        $this->obj->load->library('encrypt');

    log_message('debug', " login_routine. INICIO");
    
        //Make the input username and password into variables
        $password = $this->obj->input->post('password');
        $username = $this->obj->input->post('username');

    log_message('debug', " - login_routine: PWD Usuario: ".$username);
    log_message('debug', " - login_routine: PWD Pwd: ".$password);
        //Use the input username and password and check against 'users' table
        $query = $this->obj->db->get('clientcontacts');
        log_message('debug', " - login_routine: SQL: ".$this->obj->db->last_query());
      
      $passwordEncriptada = $this->obj->encrypt->encode($password);
      log_message('debug', " - login_routine: PWD Pwd Encriptada: ".$passwordEncriptada);
        $login_result = FALSE;
        
    foreach($query->result() as $row)
        {
        
          log_message('debug', "- login_routine: USR en base de datos: ".$row->email);  
          log_message('debug', " - login_routine: PWD en base de datos: ".$row->password);


LOG


Code:
DEBUG - 2009-07-18 19:17:20 -->  login_routine. INICIO
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: PWD Usuario: [email protected]
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: PWD Pwd: v2rh8PwW39CL
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: SQL: SELECT *
FROM (`sginfra_clientcontacts`)
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: PWD Pwd Encriptada: mgHLDiZ6U/djeZB9DhCNwsBVzoCV9seeE3EfRNnufqkICbVHuRZhYg0wbb5EguqCAdITIbnO0Vncc/+cPmVQdQ==
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: USR en base de datos: [email protected]
DEBUG - 2009-07-18 19:17:20 -->  - login_routine: PWD en base de datos: wBLAnPyS7xBRHWRTPTb4Su9sltW8307q7O1OqHc0id80l3A2Nv8JWToNn3KyJ46TZae+dTHweLKEr2IE/KfhHw==


Messages In This Thread
Error with the encode password function - by El Forum - 07-18-2009, 05:45 PM
Error with the encode password function - by El Forum - 07-19-2009, 06:27 AM
Error with the encode password function - by El Forum - 07-19-2009, 08:39 AM
Error with the encode password function - by El Forum - 07-19-2009, 09:16 AM
Error with the encode password function - by El Forum - 07-20-2009, 06:29 AM
Error with the encode password function - by El Forum - 07-20-2009, 06:40 AM
Error with the encode password function - by El Forum - 07-20-2009, 06:45 AM
Error with the encode password function - by El Forum - 07-20-2009, 06:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB