*/
class NP_SecurityEnforcer extends NucleusPlugin
{
+
public function getName()
{
return 'SecurityEnforcer';
{
$minlength = intval($minlength);
$complexity = intval($complexity);
+ $message = '';
if ( $minlength < 6 )
{
$ucchars = '[A-Z]';
$lcchars = '[a-z]';
$numchars = '[0-9]';
- $ochars = '[-~!@#\$%^&*()_+=,.<>?:;|]';
+ $ochars = '[#-~!@\\$%^&*()_+=,.<>?:;|]';
$chartypes = array($ucchars, $lcchars, $numchars, $ochars);
$tot = array(0,0,0,0);
$i = 0;
foreach ( $chartypes as $value )
{
- $tot[$i] = preg_match("#" . $value . "#", $passwd);
+ $tot[$i] = preg_match("/" . $value . "/", $passwd);
$i = $i + 1;
}