Trim _REQUEST vars mainly to avoid null terminated strings

This commit is contained in:
Deon George
2009-12-23 09:03:13 +11:00
parent efd1860a91
commit 2393c5d5e3
3 changed files with 10 additions and 7 deletions

View File

@@ -51,9 +51,12 @@ if (trim($www['cmd'])) {
error(_('You cannot perform updates while server is in read-only mode'),'error','index.php');
# If this command has been disabled by the config.
if (! $_SESSION[APPCONFIG]->isCommandAvailable('script',$www['cmd']))
if (! $_SESSION[APPCONFIG]->isCommandAvailable('script',$www['cmd'])) {
system_message(array('title'=>_('Command disabled by the server configuration'),
_('Error'),'body'=>sprintf('%s: <b>%s</b>.',_('The command could not be run'),$www['cmd']),'type'=>'error'),'index.php');
$app['script_cmd'] = null;
}
}
if ($app['script_cmd'])