mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
added code that blocked XSS scripting
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10132 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
20b23b2487
commit
efe463161e
2 changed files with 6 additions and 1 deletions
|
|
@ -249,7 +249,8 @@
|
|||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$code = preg_replace('/<\?.*(\?>)?/sm', '', $code);
|
||||
$code = preg_replace('/<\?.*(\?>)?/Usm', '', $code);
|
||||
$code = preg_replace('/<script[\s]*language[\s]*=("|\')php("|\')[\s]*>.*<\/script>/Usm', '', $code);
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_file = $oLayoutModel->getUserLayoutHtml($layout_srl);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@
|
|||
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
$code = Context::get('code');
|
||||
|
||||
$code = preg_replace('/<\?.*(\?>)?/Usm', '', $code);
|
||||
$code = preg_replace('/<script[\s]*language[\s]*=("|\')php("|\')[\s]*>.*<\/script>/Usm', '', $code);
|
||||
|
||||
$code_css = Context::get('code_css');
|
||||
if(!$layout_srl || !$code) return new Object(-1, 'msg_invalid_request');
|
||||
// Get the layout information
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue