1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

PFAHandler.php:

- store unchecked input values given to set() in $this->RAWvalues before
  running the validation functions. This is needed to make comparing 
  password and password2 possible.
  (uppercase RAW intentional to make usage harder - hopefully hard enough
  to give everybody who wants to use it some time to think over secure
  programming when working with unchecked input ;-)

AdminHandler.php:
- compare password and password2

This commit means AdminHandler is complete :-)

(Note: db_log can't handle the admin-related log actions yet.)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1297 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2011-12-19 22:50:12 +00:00
parent c65c2caa7a
commit 23c08bc02e
2 changed files with 18 additions and 0 deletions

View File

@ -206,6 +206,20 @@ class AdminHandler extends PFAHandler {
}
}
/**
* compare password / password2 field
* error message will be displayed at the password2 field
*/
protected function _field_password2($field, $val) {
if ($this->RAWvalues['password'] == $this->RAWvalues['password2']) {
unset ($this->errormsg['password2']); # no need to warn about too short etc. passwords - it's enough to display this message at the 'password' field
return true;
}
$this->errormsg['password2'] = Lang::read('pAdminEdit_admin_password_text_error');
return false;
}
}
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */