developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #1052: lib.diff

File lib.diff, 2.0 KB (added by sylvain261, 12 years ago)
  • lib/jelix/auth/jAuth.class.php

    diff -r 566754568076 lib/jelix/auth/jAuth.class.php
    a b  
    271271                else
    272272                    $persistence=86400; // 24h
    273273                $persistence += time();
     274                $encryptedLogin=jCrypt::encrypt($login,$config['persistant_crypt_key']);
    274275                $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']);
    275                 setcookie($config['persistant_cookie_name'].'[login]', $login, $persistence, $config['persistant_cookie_path']);
     276                setcookie($config['persistant_cookie_name'].'[login]', $encryptedLogin, $persistence, $config['persistant_cookie_path']);
    276277                setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $persistence, $config['persistant_cookie_path']);
    277278            }
    278279
  • lib/jelix/plugins/coord/auth/auth.coord.php

    diff -r 566754568076 lib/jelix/plugins/coord/auth/auth.coord.php
    a b  
    5151            if(isset($this->config['persistant_cookie_name']) && isset($this->config['persistant_crypt_key'])){
    5252                $cookieName=$this->config['persistant_cookie_name'];
    5353                if(isset($_COOKIE[$cookieName]['login']) && isset($_COOKIE[$cookieName]['passwd']) && strlen($_COOKIE[$cookieName]['passwd'])>0){
    54                     $login = $_COOKIE[$cookieName]['login'];
     54                    $encryptedLogin = $_COOKIE[$cookieName]['login'];
    5555                    $encryptedPassword=$_COOKIE[$cookieName]['passwd'];
    56                     jAuth::login($login,jCrypt::decrypt($encryptedPassword,$this->config['persistant_crypt_key']));
     56                    jAuth::login(jCrypt::decrypt($encryptedLogin,$this->config['persistant_crypt_key']),jCrypt::decrypt($encryptedPassword,$this->config['persistant_crypt_key']));
    5757                }
    5858            }
    5959            else{