mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 10:23:16 +09:00
#18532379 FTP 접속 정보 직접 노출되지 않게 수정.(이를 위한 수정들) 수정사항으로 필요해진 설명문 언어파일에 추가.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7026 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
71e8dbc0c9
commit
b0bf3c728f
8 changed files with 57 additions and 9 deletions
|
|
@ -48,5 +48,29 @@
|
|||
$oMemberController = &getController('member');
|
||||
$oMemberController->procMemberLogout();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save FTP PATH Info
|
||||
* @return none
|
||||
**/
|
||||
function procSaveFTPPathInfo() {
|
||||
$oInstallAdminController = &getAdminController('install');
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
Context::set('ftp_user', $ftp_info->ftp_user);
|
||||
Context::set('ftp_password', $ftp_info->ftp_password);
|
||||
Context::set('ftp_port', $ftp_info->ftp_port);
|
||||
Context::set('sftp', $ftp_info->sftp);
|
||||
$oInstallAdminController->procInstallAdminSaveFTPInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete FTP Config Info
|
||||
* @return delete success message
|
||||
**/
|
||||
function procDeleteFTPConfig() {
|
||||
$ftp_config = Context::getFTPConfigFile();
|
||||
FileHandler::removeFile($ftp_config);
|
||||
return new Object(-1, 'success_deleted');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@
|
|||
**/
|
||||
function dispAdminConfig() {
|
||||
$db_info = Context::getDBInfo();
|
||||
$oInstallController = &getController('install');
|
||||
|
||||
Context::set('sftp_support', function_exists(ssh2_sftp));
|
||||
|
||||
|
|
@ -267,8 +268,17 @@
|
|||
Context::set('langs', Context::loadLangSupported());
|
||||
|
||||
Context::set('lang_selected', Context::loadLangSelected());
|
||||
|
||||
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
// Check if FTP Info is valid.
|
||||
Context::set('ftp_user', $ftp_info->ftp_user);
|
||||
Context::set('ftp_password', $ftp_info->ftp_password);
|
||||
Context::set('ftp_port', $ftp_info->ftp_port);
|
||||
Context::set('sftp', $ftp_info->sftp);
|
||||
!$oInstallController->procInstallCheckFtp()?$ftp_info->is_valid=true:$ftp_info->is_valid=false;
|
||||
Context::set('ftp_user', null);
|
||||
Context::set('ftp_password', null);
|
||||
// Set FTP Info.
|
||||
Context::set('ftp_info', $ftp_info);
|
||||
|
||||
$site_args->site_srl = 0;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
<action name="procAdminRecompileCacheFile" type="controller" standalone="true" />
|
||||
<action name="procAdminLogout" type="controller" standalone="true" />
|
||||
<action name="procSaveFTPPathInfo" type="controller" standalone="true" />
|
||||
<action name="procDeleteFTPConfig" type="controller" standalone="true" />
|
||||
<action name="getAdminFTPList" type="model" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -79,4 +79,5 @@
|
|||
$lang->use_db_session = '인증 세션 DB 사용';
|
||||
$lang->about_db_session = '인증 시 사용되는 PHP 세션을 DB로 사용하는 기능입니다.<br/>웹서버의 사용률이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다.<br/>단 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.';
|
||||
$lang->sftp = 'SFTP 사용';
|
||||
$lang->about_ftp_info_delete = 'XE가 FTP에 정상적으로 접속할 수 있습니다.<br />FTP 접속 정보 보호를 위해, 현재 저장된 FTP 접속 정보(아이디, 비밀번호, 포트번호)를 수정하시려면 FTP 정보 파일을 삭제하셔야 합니다.<br />FTP 접속 정보 파일을 삭제 하시려면 삭제 버튼을 클릭하세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -15,11 +15,16 @@
|
|||
sObj.value = module_srl;
|
||||
obj.value = decodeURIComponent(browser_title.replace(/\+/g," "))+' ('+mid+')';
|
||||
}
|
||||
<!--@if($ftp_info && $ftp_info->ftp_password && $ftp_info->ftp_user)-->
|
||||
<!--@if($ftp_info && $ftp_info->is_valid)-->
|
||||
var pwd = '{$pwd}';
|
||||
params = new Array();
|
||||
params['pwd'] = pwd;
|
||||
exec_xml('admin','getAdminFTPList', params, completeGetFtpInfo, new Array('list','error','message'));
|
||||
<!--@elseif($ftp_info && !$ftp_info->is_valid && $ftp_info->ftp_user && $ftp_info->ftp_password)-->
|
||||
// if FTP Info is not valid, alert error message.
|
||||
jQuery(function($) {
|
||||
doCheckFTPInfo();
|
||||
});
|
||||
<!--@end-->
|
||||
</script>
|
||||
|
||||
|
|
@ -129,6 +134,7 @@
|
|||
|
||||
<h4 class="xeAdmin" id="ftpSetup">{$lang->ftp_form_title}</h4>
|
||||
<p class="summary">{$lang->about_ftp_info}</p>
|
||||
<!--@if(!$ftp_info || !$ftp_info->is_valid)-->
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, install_ftp_info);" id="ftp_form">
|
||||
{@ $nCols = 3; }
|
||||
<table cellspacing="0" class="rowTable">
|
||||
|
|
@ -157,13 +163,14 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<!--@if($ftp_info && $ftp_info->ftp_password && $ftp_info->ftp_user)-->
|
||||
<!--@elseif($ftp_info && $ftp_info->is_valid)-->
|
||||
<p class="summary">{$lang->msg_ftp_connect_success}</p>
|
||||
<p class="summary">{$lang->about_ftp_info_delete}</p>
|
||||
<span class="button black strong"><button type="button" onclick="doDeleteFTPConfig(); return false;">{$lang->cmd_delete}</button></span>
|
||||
<!--@endif-->
|
||||
<!--@if($ftp_info && $ftp_info->is_valid)-->
|
||||
<h4 class="xeAdmin" id="ftpSetup">{$lang->ftp_path_title}</h4>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, install_ftp_path)">
|
||||
<input type="hidden" name="ftp_user" value="{$ftp_info->ftp_user}" />
|
||||
<input type="hidden" name="ftp_password" value="{$ftp_info->ftp_password}" />
|
||||
<input type="hidden" name="ftp_port" value="{$ftp_info->ftp_port}" />
|
||||
<input type="hidden" name="sftp" value="{$ftp_info->sftp}" />
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<form>
|
||||
<node target="ftp_user" required="true" />
|
||||
<node target="ftp_password" required="true" />
|
||||
<node target="ftp_port" required="true" />
|
||||
<node target="ftp_port" />
|
||||
<node target="sftp" />
|
||||
</form>
|
||||
<response callback_func="completeMessage">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<filter name="install_ftp_path" module="install" act="procInstallAdminSaveFTPInfo" confirm_msg_code="confirm_submit">
|
||||
<filter name="install_ftp_path" module="admin" act="procSaveFTPPathInfo" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="ftp_root_path" required="true" />
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -38,3 +38,7 @@ function completeGetFtpInfo(ret_obj)
|
|||
e.append(jQuery(list));
|
||||
}
|
||||
|
||||
function doDeleteFTPConfig() {
|
||||
exec_xml('admin','procDeleteFTPConfig');
|
||||
setTimeout(function() { location.reload(); }, 300);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue