Skip to content
Snippets Groups Projects
Commit 2c15931b authored by Prasad's avatar Prasad
Browse files

Setup expectation on viewer variable assignment

parent 38c4121f
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,17 @@ class Vtiger_Viewer extends SmartyBC {
return "modules/Vtiger/$templateName";
}
}
/** @Override */
public function assign($tpl_var, $value = null, $nocache = false) {
// Reject unexpected value assignments.
if ($tpl_var == 'SELECTED_MENU_CATEGORY') {
if ($val && preg_match("/[^a-zA-Z0-9_-]/", $val, $m)) {
return;
}
}
return parent::assign($tpl_var, $value, $nocache);
}
/**
* Function to display/fetch the smarty file contents
......@@ -213,4 +224,4 @@ function vresource_url($url) {
function getPurifiedSmartyParameters($param){
return htmlentities($_REQUEST[$param]);
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment