Move XSS filtering before multilang juggling

This commit is contained in:
Kijin Sung 2022-02-07 02:13:59 +09:00
parent 5a95f0c3f3
commit df1438ea04

View file

@ -903,6 +903,12 @@ class documentController extends document
$obj->content = getModel('editor')->converter($obj, 'document');
}
// Remove iframe and script if not a top adminisrator in the session.
if($logged_info->is_admin != 'Y')
{
$obj->content = removeHackTag($obj->content);
}
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
if($source_obj->get('lang_code') != Context::getLangType())
{
@ -928,12 +934,6 @@ class documentController extends document
}
}
// Remove iframe and script if not a top adminisrator in the session.
if($logged_info->is_admin != 'Y')
{
$obj->content = removeHackTag($obj->content);
}
// if temporary document, regdate is now setting
if($source_obj->get('status') == $this->getConfigStatus('temp')) $obj->regdate = date('YmdHis');