Skip to content

Commit

Permalink
No transmormation of data objectid before calling trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 10, 2018
1 parent 2fb5de6 commit 63b9384
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/lib/security.lib.php
Expand Up @@ -186,15 +186,15 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
//print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
//print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."<br>";

if ($dbt_select != 'rowid' && $dbt_select != 'id') $objectid = "'".$objectid."'";

// Get more permissions checks from hooks
$parameters=array('features'=>$features, 'objectid'=>$objectid, 'idtype'=>$dbt_select);
$reshook=$hookmanager->executeHooks('restrictedArea',$parameters);
if (! empty($hookmanager->resArray['result'])) return true;
if ($reshook > 0) return false;

// Features/modules to check
if ($dbt_select != 'rowid' && $dbt_select != 'id') $objectid = "'".$objectid."'";

// Features/modules to check
$featuresarray = array($features);
if (preg_match('/&/', $features)) $featuresarray = explode("&", $features);
else if (preg_match('/\|/', $features)) $featuresarray = explode("|", $features);
Expand Down

0 comments on commit 63b9384

Please sign in to comment.