prevent xss

This commit is contained in:
conory 2017-04-11 14:42:56 +09:00
parent 4e157c9ec0
commit 9026f9df8a

View file

@ -56,11 +56,19 @@ class documentView extends document
*/
function dispDocumentPreview()
{
Context::set('layout','none');
$content = Context::get('content');
if(Context::getRequestMethod() == 'GET')
{
return new Object(-1, 'msg_invalid_request');
}
if(Context::get('logged_info')->is_admin != 'Y')
{
Context::set('content', removeHackTag(Context::get('content')));
}
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('preview_page');
Context::set('layout', 'none');
}
/**