Add security check to apacheconf generation

This commit is contained in:
Alan Garcia 2014-01-15 16:01:54 +00:00
parent cf01241915
commit 40cb4b59f1
1 changed files with 6 additions and 0 deletions

View File

@ -1953,6 +1953,12 @@ function generate_apacheconf($p = null) {
"%%mail_account%%"=> $p['mail'],
"%%user%%"=> "FIXME",
));
// Security check
if ( $p['uid'] < 1999 ) { // if UID is not an AlternC uid
$ret.= "# ERROR: Sub_id: ".$p['sub_id']."- The uid seem to be dangerous\n";
continue;
}
// Return the conf
$ret.= "# Sub_id: ".$p['sub_id']."\n".$tpl;