mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
issue 160, prevent session close error when use db session
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9266 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
88e59bc265
commit
bd97f313b1
1 changed files with 12 additions and 3 deletions
|
|
@ -42,9 +42,18 @@
|
||||||
$this->entry = Context::convertEncodingStr(Context::get('entry'));
|
$this->entry = Context::convertEncodingStr(Context::get('entry'));
|
||||||
|
|
||||||
// Validate variables to prevent XSS
|
// Validate variables to prevent XSS
|
||||||
if($this->module && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->module)) die(Context::getLang("msg_invalid_request"));
|
$isInvalid = null;
|
||||||
if($this->mid && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->mid)) die(Context::getLang("msg_invalid_request"));
|
if($this->module && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->module)) $isInvalid = true;
|
||||||
if($this->act && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->act)) die(Context::getLang("msg_invalid_request"));
|
if($this->mid && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->mid)) $isInvalid = true;
|
||||||
|
if($this->act && !preg_match("/^([a-z0-9\_\-]+)$/i",$this->act)) $isInvalid = true;
|
||||||
|
if ($isInvalid)
|
||||||
|
{
|
||||||
|
htmlHeader();
|
||||||
|
echo Context::getLang("msg_invalid_request");
|
||||||
|
htmlFooter();
|
||||||
|
Context::close();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// execute addon (before module initialization)
|
// execute addon (before module initialization)
|
||||||
$called_position = 'before_module_init';
|
$called_position = 'before_module_init';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue