Ignore:
Timestamp:
01/12/10 19:10:45 (14 years ago)
Author:
nanardon
Message:
  • website check password over cracklib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm

    r545 r585  
    5252                if ($c->req->param('passwd') eq ($c->req->param('cpasswd') || '')) { 
    5353                    my $sync = $c->model('Accounts')->sync_access; 
     54                     
     55                    # This is widelly burk: 
     56                    # synchaccess do not manage connect() at time, opening a 
     57                    # backdoor then :\ 
     58                    foreach ($sync->bases) { $_->{_user} = $c->user->{username} } 
     59                     
    5460                    my $suser = $sync->get_object('user', $username); 
    55                     if ($suser && $suser->set_password($c->req->param('passwd'))) { 
    56                         $c->stash->{pchanged} = 1; 
     61                    my $msg = $c->stash->{user}->check_password($c->req->param('passwd')); 
     62                    if ($msg ne 'ok') { 
     63                        $c->stash->{pmerror} = $msg . ', mot de passe inchangé'; 
     64                    } elsif ($suser && $suser->set_password($c->req->param('passwd'))) { 
     65                        $c->stash->{pmerror} = 'Mot de passe changé'; 
    5766                        $sync->commit; 
    5867                    } else { 
    59                         $c->stash->{notchanged} = 1; 
     68                        $c->stash->{pmerror} = 'Erreur lors du changement de mot de passe'; 
    6069                    } 
    6170                } else { 
    62                     $c->stash->{pmismatch} = 1; 
     71                    $c->stash->{pmerror} = 'Mot de passe différents'; 
    6372                } 
    6473            } 
Note: See TracChangeset for help on using the changeset viewer.