Skip to content

Commit

Permalink
#2301 배포본에 내장된 autoescape 적용 대상을 전체로 확대
Browse files Browse the repository at this point in the history
  • Loading branch information
bnu committed Sep 19, 2018
1 parent 191d7af commit 5dc740b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions classes/template/TemplateHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1116,10 +1116,17 @@ function isSafeguard()
if ($this->dbinfo->safeguard === 'Y') return true;

$absPath = str_replace(_XE_PATH_, '', $this->path);
$modules = '(addon|admin|adminlogging|autoinstall|board|comment|communication|counter|document|editor|file|importer|install|integration_search|krzip|layout|member|menu|message|module|page|point|poll|rss|seo|session|spamfilter|syndication|tag|trash|widget)';
$dirTpl = '(addon|admin|adminlogging|autoinstall|board|comment|communication|counter|document|editor|file|importer|install|integration_search|krzip|layout|member|menu|message|module|page|point|poll|rss|seo|session|spamfilter|syndication|tag|trash|widget)';
$dirSkins = '(layouts\/default|layouts\/user_layout|layouts\/xedition|layouts\/xedition\/demo|m\.layouts\/colorCode|m\.layouts\/default|m\.layouts\/simpleGray|modules\/board\/m\.skins\/default|modules\/board\/m\.skins\/simpleGray|modules\/board\/skins\/default|modules\/board\/skins\/xedition|modules\/communication\/m\.skins\/default|modules\/communication\/skins\/default|modules\/editor\/skins\/ckeditor|modules\/editor\/skins\/xpresseditor|modules\/integration_search\/skins\/default|modules\/layout\/faceoff|modules\/member\/m\.skins\/default|modules\/member\/skins\/default|modules\/message\/m\.skins\/default|modules\/message\/skins\/default|modules\/message\/skins\/xedition|modules\/page\/m\.skins\/default|modules\/page\/skins\/default|modules\/poll\/skins\/default|modules\/poll\/skins\/simple|widgets\/content\/skins\/default|widgets\/counter_status\/skins\/default|widgets\/language_select\/skins\/default|widgets\/login_info\/skins\/default|widgets\/mcontent\/skins\/default|widgetstyles\/simple)';

// admin, common layout
if(preg_match('/^(\.\/)?(modules\/' . $modules . '|common)\/tpl\//', $absPath))
// 'tpl'
if(preg_match('/^(\.\/)?(modules\/' . $dirTpl . '|common)\/tpl\//', $absPath))
{
return true;
}

// skin, layout
if(preg_match('/^(\.\/)?(' . $dirSkin . '\//', $absPath))
{
return true;
}
Expand Down

0 comments on commit 5dc740b

Please sign in to comment.