[geeklog-cvs] Auth_Enterprise/Server AEPasswordGenerator.class.php,1.1,1.2

tony at iowaoutdoors.org tony at iowaoutdoors.org
Thu Jun 17 01:31:53 EDT 2004


Update of /var/cvs/Auth_Enterprise/Server
In directory www:/tmp/cvs-serv6268

Modified Files:
	AEPasswordGenerator.class.php 
Log Message:
Fixed bugs, should be working fine now

Index: AEPasswordGenerator.class.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Server/AEPasswordGenerator.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AEPasswordGenerator.class.php	16 Jun 2004 23:13:08 -0000	1.1
--- AEPasswordGenerator.class.php	17 Jun 2004 05:31:49 -0000	1.2
***************
*** 47,51 ****
          
          // Generate all the characters randomly.
!         for ($i = 0; $i < $numChars - 1; $i++) {
              $tmpNum = rand(0,3);
              switch ($tmpNum) {
--- 47,51 ----
          
          // Generate all the characters randomly.
!         for ($i = 0; $i < $numChars; $i++) {
              $tmpNum = rand(0,3);
              switch ($tmpNum) {
***************
*** 76,80 ****
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
--- 76,80 ----
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($tmpIndex, $usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
***************
*** 86,90 ****
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
--- 86,90 ----
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($tmpIndex, $usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
***************
*** 96,105 ****
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
!             $randomPass[$tmpIndex] = generateSpecial();
          }
!     
          // Now return generated password
          return implode('',$randomPass);
--- 96,105 ----
              $usedIndexes[] = $tmpIndex;
              $tmpIndex = rand(0, $numChars);
!             while ($tmpIndex = in_array($tmpIndex, $usedIndexes)) {
                  $tmpIndex = rand(0, $numChars);
              }
!             $randomPass[$tmpIndex] = AEPasswordGenerator::generateSpecial();
          }
! 		
          // Now return generated password
          return implode('',$randomPass);
***************
*** 168,173 ****
                  }
              }
-         } else {
-             $hasUpper = true;
          }
          
--- 168,171 ----
***************
*** 181,186 ****
                  }
              }
-         } else {
-             $hasLower = true;
          }
              
--- 179,182 ----
***************
*** 195,200 ****
                  }
              }
-         } else {
-             $hasNum = true;
          }
          
--- 191,194 ----
***************
*** 208,213 ****
                  }
              }
-         } else {
-             $hasChar = true;
          }
          
--- 202,205 ----
***************
*** 216,220 ****
              return true;
          }
!         
          return false;
          
--- 208,212 ----
              return true;
          }
! 
          return false;
          




More information about the geeklog-cvs mailing list