2
0
forked from Wavyzz/dolibarr

Fix More powerfull detection of bad use of newToken

This commit is contained in:
Laurent Destailleur
2020-10-12 14:04:34 +02:00
parent 75997bb8f5
commit f468c61df3

View File

@@ -341,7 +341,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
$ok=true;
$matches=array();
// Check string name="token" value="'.$_SESSINON
preg_match_all('/name="token" value="\'\.\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER);
preg_match_all('/name="token" value="\'\s*\.\s*\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER);
foreach ($matches as $key => $val)
{
if ($file['name'] != 'excludefile.php')