#1334 안전하지 않은 PHP 버전 사용에 대한 경고 및 쉬운설치 차단

- PHP 5.3이하 버전 사용에 대한 경고문 추가
- PHP 5.3이하 버전에서 XE Core 1.8로 업데이트 차단
This commit is contained in:
bnu 2015-03-18 14:50:48 +09:00
parent 656e378175
commit 9587c6fcbe
6 changed files with 42 additions and 2 deletions

View file

@ -306,6 +306,7 @@ class autoinstallAdminModel extends autoinstall
if($dep->path === '.')
{
$package->contain_core = TRUE;
$package->contain_core_version = $dep->version;
}
}
else
@ -327,6 +328,7 @@ class autoinstallAdminModel extends autoinstall
if($package->path === '.')
{
$package->contain_core = TRUE;
$package->contain_core_version = $package->version;
}
}

View file

@ -362,6 +362,14 @@ class autoinstallAdminView extends autoinstall
Context::set("package", $package);
Context::set('contain_core', $package->contain_core);
Context::set('contain_core_version', $package->contain_core_version);
$does_not_update_xecore = FALSE;
if($package->contain_core_version && version_compare($package->contain_core_version, '1.8.0', '>=') && version_compare(PHP_VERSION, __XE_MIN_PHP_VERSION__, '<'))
{
$does_not_update_xecore = TRUE;
}
Context::set('does_not_update_xecore', $does_not_update_xecore);
if(!$_SESSION['ftp_password'])
{

View file

@ -2,6 +2,21 @@
<load target="js/waiting.js" usecdn="true" />
<h2>{$package->title} ver. {$package->version}</h2>
<div class="message error" cond="version_compare(PHP_VERSION, __XE_MIN_PHP_VERSION__, '<')">
<h2>안전하지 않은 PHP 버전 경고</h2>
<p>이 서버는 안전하지 않은 PHP 버전을 사용하고 있으며, PHP를 최신 안정 버전으로의 업그레이드를 권장합니다.</p>
<p>이 서버의 PHP 버전 : <strong>{phpversion()}</strong></p>
<p><a href="http://php.net/downloads.php" target="_blank">PHP 최신 안정버전 확인하기</a></p>
<ul>
<li>매우 심각한 PHP 보안 문제 및 공격에 노출될 수 있습니다.</li>
<li>XE 최신 버전을 사용할 수 없습니다.</li>
<li>XE 최신 버전 이상을 지원하는 확장 기능을 사용할 수 없습니다.</li>
<li>일부 확장 기능이 동작하지 않거나, 이로 인해 장애가 발생할 수 있습니다.</li>
</ul>
</div>
<div cond="$contain_core" class="x_alert x_alert-block">
<h4>{$lang->msg_update_core_title}</h4>
<p>{$lang->msg_update_core}</p>
@ -24,7 +39,7 @@
</ul>
</div>
<block cond="!$package->installed || $package->need_update">
<block cond="!$does_not_update_xecore && (!$package->installed || $package->need_update)">
<div cond="!$directModuleInstall->toBool() || $show_ftp_note" class="x_well x_clearfix">
<block cond="!$directModuleInstall->toBool()">
<p>{$lang->msg_direct_install_not_supported}</p>