mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix #810 do not add current IP to sitelock whitelist automatically
사이트 잠금 상태에서도 관리자는 로그인할 수 있도록 변경되었으므로 더이상 관리자의 IP 주소를 강제로 추가해 줄 필요가 없음.
This commit is contained in:
parent
5e296e54e2
commit
141aabdaf7
6 changed files with 1 additions and 25 deletions
|
|
@ -904,18 +904,6 @@ class adminAdminController extends admin
|
|||
return $item !== '';
|
||||
}));
|
||||
|
||||
if ($vars->sitelock_locked === 'Y')
|
||||
{
|
||||
if (!Rhymix\Framework\Filters\IpFilter::inRanges('127.0.0.1', $allowed_ip))
|
||||
{
|
||||
array_unshift($allowed_ip, '127.0.0.1');
|
||||
}
|
||||
if (!Rhymix\Framework\Filters\IpFilter::inRanges(RX_CLIENT_IP, $allowed_ip))
|
||||
{
|
||||
array_unshift($allowed_ip, RX_CLIENT_IP);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Rhymix\Framework\Filters\IpFilter::validateRanges($allowed_ip))
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_ip');
|
||||
|
|
|
|||
|
|
@ -622,14 +622,6 @@ class adminAdminView extends admin
|
|||
Context::set('sitelock_message', escape(Rhymix\Framework\Config::get('lock.message')));
|
||||
|
||||
$allowed_ip = Rhymix\Framework\Config::get('lock.allow') ?: array();
|
||||
if (!Rhymix\Framework\Filters\IpFilter::inRanges('127.0.0.1', $allowed_ip))
|
||||
{
|
||||
array_unshift($allowed_ip, '127.0.0.1');
|
||||
}
|
||||
if (!Rhymix\Framework\Filters\IpFilter::inRanges(RX_CLIENT_IP, $allowed_ip))
|
||||
{
|
||||
array_unshift($allowed_ip, RX_CLIENT_IP);
|
||||
}
|
||||
Context::set('sitelock_allowed_ip', implode(PHP_EOL, $allowed_ip));
|
||||
Context::set('remote_addr', RX_CLIENT_IP);
|
||||
|
||||
|
|
|
|||
|
|
@ -346,7 +346,6 @@ $lang->sitelock_whitelist = 'IPs allowed to access';
|
|||
$lang->sitelock_title = 'Sign Title';
|
||||
$lang->sitelock_message = 'Sign Contents';
|
||||
$lang->sitelock_message_help = 'You can use HTML tags.';
|
||||
$lang->sitelock_warning_whitelist = 'You should include the IP of the administrator here.';
|
||||
$lang->your_ip = 'Your IP';
|
||||
$lang->sitelock_in_use = 'This site is locked.';
|
||||
$lang->about_sitelock_in_use = 'Only the administrator and visitors from specified IP addresses can access this site.';
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ $lang->sitelock_whitelist = '接近許可IP';
|
|||
$lang->sitelock_title = '案内文タイトル';
|
||||
$lang->sitelock_message = '案内文内容';
|
||||
$lang->sitelock_message_help = 'HTMLタグを使用できます。';
|
||||
$lang->sitelock_warning_whitelist = 'ここに管理者のIPを必ず記入てください。';
|
||||
$lang->your_ip = '接続したIP';
|
||||
$lang->sitelock_in_use = 'サイトロック状態です。';
|
||||
$lang->about_sitelock_in_use = '管理者との接続が許可されたIPのみのサイトの利用が可能です。';
|
||||
|
|
|
|||
|
|
@ -342,7 +342,6 @@ $lang->sitelock_whitelist = '접근 허용 IP';
|
|||
$lang->sitelock_title = '안내문 제목';
|
||||
$lang->sitelock_message = '안내문 내용';
|
||||
$lang->sitelock_message_help = 'HTML 태그를 사용할 수 있습니다.';
|
||||
$lang->sitelock_warning_whitelist = '사이트 잠금 사용시 관리자의 IP가 반드시 이 목록에 포함되어야 합니다.';
|
||||
$lang->your_ip = '접속하신 IP';
|
||||
$lang->sitelock_in_use = '사이트 잠금 상태입니다.';
|
||||
$lang->about_sitelock_in_use = '관리자 및 접속이 허용된 IP에서만 사이트 이용이 가능합니다.';
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="sitelock_allowed_ip">{$lang->sitelock_whitelist} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_general_sitelock_whitelist" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<textarea name="sitelock_allowed_ip" id="sitelock_allowed_ip" rows="4" cols="42" placeholder="{$remote_addr} ({$lang->local_ip_address})" style="margin-right:10px">{$sitelock_allowed_ip}</textarea>
|
||||
<span class="x_help-block">{$lang->sitelock_warning_whitelist}</span>
|
||||
<textarea name="sitelock_allowed_ip" id="sitelock_allowed_ip" rows="4" cols="42" style="margin-right:10px">{$sitelock_allowed_ip}</textarea>
|
||||
<span class="x_help-block">{$lang->your_ip} : {$remote_addr}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue