fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6906] admin: fix password validation


From: Sigurd Nes
Subject: [Fmsystem-commits] [6906] admin: fix password validation
Date: Wed, 02 Feb 2011 08:21:25 +0000

Revision: 6906
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6906
Author:   sigurdne
Date:     2011-02-02 08:21:25 +0000 (Wed, 02 Feb 2011)
Log Message:
-----------
admin: fix password validation

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.account.inc.php
    trunk/phpgwapi/setup/phpgw_no.lang

Modified: trunk/phpgwapi/inc/class.account.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.account.inc.php    2011-02-02 07:58:37 UTC (rev 
6905)
+++ trunk/phpgwapi/inc/class.account.inc.php    2011-02-02 08:21:25 UTC (rev 
6906)
@@ -710,38 +710,38 @@
                        }
                        else
                        {
-                               $error = array();
+                               $_error = array();
                                switch ( 
$GLOBALS['phpgw_info']['server']['password_level'] )
                                {
                                        default:
                                        case 'NONALPHA':
-                                               $error[] = 
self::_validate_password_level_nonalpha($passwd);
+                                               $_error[] = 
self::_validate_password_level_nonalpha($passwd);
                                                // fall through
                                        case '1NUM':
-                                               $error[] = 
self::_validate_password_level_1num($passwd);
+                                               $_error[] = 
self::_validate_password_level_1num($passwd);
                                                // fall through
                                        case '2LOW':
-                                               $error[] = 
self::_validate_password_level_2low($passwd);
+                                               $_error[] = 
self::_validate_password_level_2low($passwd);
                                                // fall through
                                        case '2UPPER':
-                                               $error[] = 
self::_validate_password_level_2upper($passwd);
+                                               $_error[] = 
self::_validate_password_level_2upper($passwd);
                                                // fall through
                                        case '8CHAR':
-                                               $error[] = 
self::_validate_password_level_8char($passwd);
+                                               $_error[] = 
self::_validate_password_level_8char($passwd);
                                }
                        }
-                       if($error)
+                       $error = array();
+                       foreach($_error as $_msq)
                        {
-                               $msq = array();
-                               foreach($error as $_msq)
+                               if($_msq)
                                {
-                                       if($_msq)
-                                       {
-                                               $msq[] = $_msq;
-                                       }
+                                       $error[] = $_msq;
                                }
-                               throw new 
Exception(implode('<br/>',array_reverse($msq)));
                        }
+                       if($error)
+                       {
+                               throw new 
Exception(implode('<br/>',array_reverse($error)));
+                       }
                }
 
                /**

Modified: trunk/phpgwapi/setup/phpgw_no.lang
===================================================================
--- trunk/phpgwapi/setup/phpgw_no.lang  2011-02-02 07:58:37 UTC (rev 6905)
+++ trunk/phpgwapi/setup/phpgw_no.lang  2011-02-02 08:21:25 UTC (rev 6906)
@@ -134,3 +134,4 @@
 Password must contain at least 2 lower case characters common  no      Passord 
må inneholde minst 2 små bosktaver
 Password must contain at least 1 number        common  no      Passord må 
inneholde minst 1 tall
 Password must contain at least 1 non alphanumeric character    common  no      
Passord må inneholde minst 1 spesialtegn
+The passwords don't match      common  no      Passordene er ikke like




reply via email to

[Prev in Thread] Current Thread [Next in Thread]