You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 bugs with the same module :
1/ Tables knowledge management has not been created during deployment process, we had to create them manually with their foreign key, we got SQL script from install folder
2/ During configuration, we can't change numbering, we got an error identified as hacking tentative
Dolibarr Version
20.0.1
Environment PHP
8.2
Environment Database
No response
Steps to reproduce the behavior and expected behavior
After restoring the 3 tables used by this module with their foreign key, the interface for configuring the module worked fine.
If you try to configure the module by changing the state of the numbering model from 'standard' to 'advanced' you got the error, however you already filled the mask or not.
We were able to identify the root cause on the code and resolve it, on the file '/admin/knowledgemanagement.php', you'll find the portion of code below with our explanation.
Attached files
Screenshot of the error :
Following the PHP code we changed from line 75 to 79 into the file '/admin/knowledgemanagement.php', the changes we made is just to bypass the problem :
$tmpobjectkey = GETPOST('object', 'aZ09');
if($tmpobjectkey='knowledgerecord') $tmpobjectkey='KnowledgeRecord'; // -- New line added --
if ($tmpobjectkey && !in_array($tmpobjectkey, $myTmpObjects['knowledgemanagement'])) { // if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) { -- Original Value --
accessforbidden('Bad value for object. Hack attempt ?');
}
Following our opinion about the error :
1/ The variable '$tmpobjectkey' is filled with the right value but there's problem with case letter, to avoid major changing we included an if condition to change the value to right case
2/ The condition will never work as it is looking on the wrong place, we made the right change to make it working
Hope this help
Good luck ;-)
The text was updated successfully, but these errors were encountered:
Bug
2 bugs with the same module :
1/ Tables knowledge management has not been created during deployment process, we had to create them manually with their foreign key, we got SQL script from install folder
2/ During configuration, we can't change numbering, we got an error identified as hacking tentative
Dolibarr Version
20.0.1
Environment PHP
8.2
Environment Database
No response
Steps to reproduce the behavior and expected behavior
After restoring the 3 tables used by this module with their foreign key, the interface for configuring the module worked fine.
If you try to configure the module by changing the state of the numbering model from 'standard' to 'advanced' you got the error, however you already filled the mask or not.
We were able to identify the root cause on the code and resolve it, on the file '/admin/knowledgemanagement.php', you'll find the portion of code below with our explanation.
Attached files
Screenshot of the error :
Following the PHP code we changed from line 75 to 79 into the file '/admin/knowledgemanagement.php', the changes we made is just to bypass the problem :
$tmpobjectkey = GETPOST('object', 'aZ09');
if($tmpobjectkey='knowledgerecord') $tmpobjectkey='KnowledgeRecord'; // -- New line added --
if ($tmpobjectkey && !in_array($tmpobjectkey, $myTmpObjects['knowledgemanagement'])) { // if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) { -- Original Value --
accessforbidden('Bad value for object. Hack attempt ?');
}
Following our opinion about the error :
1/ The variable '$tmpobjectkey' is filled with the right value but there's problem with case letter, to avoid major changing we included an if condition to change the value to right case
2/ The condition will never work as it is looking on the wrong place, we made the right change to make it working
Hope this help
Good luck ;-)
The text was updated successfully, but these errors were encountered: