OSDN Git Service

FIX:NP_SecurityEnforcerのpreg_matchのデリミタを変更して「#」のエスケープを削除
[nucleus-jp/nucleus-next.git] / nucleus / plugins / NP_SecurityEnforcer.php
index bf1a027..915d1d5 100644 (file)
@@ -296,14 +296,14 @@ class NP_SecurityEnforcer extends NucleusPlugin
                $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;
                }