User Tools

Site Tools


reference:password_strength_checking_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:password_strength_checking_script [2016/10/24 08:34] paulreference:password_strength_checking_script [2026/01/05 09:25] (current) paul
Line 29: Line 29:
  
 function Check(Username, Password, minlength) function Check(Username, Password, minlength)
- lowerPassword = string.lower(Password) + local lowerPassword = string.lower(Password) 
- if Password == Username then+ if Password == string.lower(Usernamethen
      return false      return false
  end  end
Line 40: Line 40:
   end   end
  
- hasDigit = 0 + local hasDigit = 0 
- hasCaps = 0 + local hasCaps = 0 
- hasLower = 0 + local hasLower = 0 
- hasSpecial = 0+ local hasSpecial = 0
  if string.find(Password, "%d") then  if string.find(Password, "%d") then
     hasDigit = 1     hasDigit = 1
Line 56: Line 56:
      hasSpecial = 1      hasSpecial = 1
  end  end
- differentTypes = hasDigit + hasCaps + hasLower + hasSpecial+ local differentTypes = hasDigit + hasCaps + hasLower + hasSpecial
    
  if differentTypes >= minTypes then  if differentTypes >= minTypes then
reference/password_strength_checking_script.1477298093.txt.gz · Last modified: 2018/11/14 10:44 (external edit)