Remove optional SSL

This commit is contained in:
Kijin Sung 2020-07-03 00:41:59 +09:00
parent 9fdcd86f1d
commit 67dfb3c282
20 changed files with 24 additions and 205 deletions

View file

@ -110,9 +110,8 @@ $lang->about_auto_select_lang = 'Automatically select the language based on the
$lang->about_recompile_cache = 'Delete useless or invalid cache files?';
$lang->confirm_run = 'It may take a long time. Do you want to run?';
$lang->use_ssl = 'Use HTTPS';
$lang->ssl_options['none'] = 'None';
$lang->ssl_options['optional'] = 'Optional (not recommended)';
$lang->ssl_options['always'] = 'Always (recommended)';
$lang->ssl_options['none'] = 'No';
$lang->ssl_options['always'] = 'Yes (recommended)';
$lang->cmd_http_port = 'HTTP Port';
$lang->cmd_https_port = 'HTTPS Port';
$lang->cmd_index_module_srl = 'Main Module';

View file

@ -35,7 +35,6 @@ $lang->welcome_to_xe = 'Esta es la página del Administrador de Rhymix';
$lang->about_lang_env = 'Para aplicar idioma seleccionado conjunto de los usuarios, como por defecto, haga clic en el botón [Guardar] el cambio.';
$lang->xe_license = 'Rhymix está bajo la Licencia de GPL';
$lang->ssl_options['none'] = 'Desactivar';
$lang->ssl_options['optional'] = 'Opcionalmente el (no recomendado)';
$lang->ssl_options['always'] = 'Utilice siempre el (recomendado)';
$lang->about_use_ssl = 'Opcionalmente, la composición de suscripción / editar la información y el uso de SSL especificada en la acción es siempre el uso de SSL para todos los servicios que se utilizarán.';
$lang->server_ports = 'Especifique el puerto del servidor';

View file

@ -34,7 +34,6 @@ $lang->welcome_to_xe = 'Bienvenue sur la Page d\'Administration du Rhymix';
$lang->about_lang_env = 'Vous pouvez fixer la Langue Par Défaut par cliquer le boutton [Conserver] au-dessous. Les visiteurs vont voir tous les menus et les messages en langue que vous choisissez.';
$lang->xe_license = 'Rhymix s\'applique la GPL';
$lang->ssl_options['none'] = 'Ne Pas utiliser';
$lang->ssl_options['optional'] = 'Optionnel (non recommandé)';
$lang->ssl_options['always'] = 'Toujours (recommandé)';
$lang->about_use_ssl = 'Si l\'on choisit \'Optionnel\' , on utilise protocole SSL seulement dans quelques services comme inscription ou modification. Si l\'on choisit \'Toujours\', on utilise protocole SSL dans tous les services.';
$lang->server_ports = 'déclarer le port de serveur';

View file

@ -70,7 +70,6 @@ $lang->about_recompile_cache = '不要もしくは、無効なキャッシュフ
$lang->confirm_run = '時間がかかる場合があります。実行しますか?';
$lang->use_ssl = '<abbr title="Secure Sockets Layer">SSL</abbr>を使用';
$lang->ssl_options['none'] = '使わない';
$lang->ssl_options['optional'] = '部分的に使う(推奨しない)';
$lang->ssl_options['always'] = '常に使う(推奨)';
$lang->about_use_ssl = '「部分的に使う」は、「会員登録/会員情報変更」など指定されたアクションでSSLを使います。「常に使う」は、すべてのサービスにSSLを使います。SSLサーバ証明書がインストールされてない場合での使用はお控えください。サイトへのアクセスができない場合があります。';
$lang->server_ports = 'サーバーポート指定';

View file

@ -110,7 +110,6 @@ $lang->about_recompile_cache = '쓸모 없어졌거나 잘못된 캐시파일들
$lang->confirm_run = '오랜 시간이 걸릴 수 있습니다. 실행하시겠습니까?';
$lang->use_ssl = 'HTTPS 사용';
$lang->ssl_options['none'] = '사용하지 않음';
$lang->ssl_options['optional'] = '선택적으로 사용 (권장하지 않음)';
$lang->ssl_options['always'] = '항상 사용 (권장)';
$lang->cmd_http_port = 'HTTP 포트';
$lang->cmd_https_port = 'HTTPS 포트';

View file

@ -30,7 +30,6 @@ $lang->xe_license = 'Rhymix подчиняется Стандартной Общ
$lang->yesterday = 'Вчера';
$lang->today = 'Сегодня';
$lang->ssl_options['none'] = 'Никогда';
$lang->ssl_options['optional'] = 'На выбор';
$lang->ssl_options['always'] = 'Всегда';
$lang->thumbnail_type = 'Тип миниатюры';
$lang->thumbnail_crop = 'Обрезать';

View file

@ -62,7 +62,6 @@ $lang->about_recompile_cache = 'Gereksiz ve ya yanlış olan önbellek dosyalar
$lang->confirm_run = 'Bu işlem biraz uzun sürebilir. Başlatmak istiyor musunuz?';
$lang->use_ssl = '<abbr title="Secure Sockets Layer">SSL</abbr>\'i kullanmak istiyor musunuz?';
$lang->ssl_options['none'] = 'Hiçbir zaman';
$lang->ssl_options['optional'] = 'İsteğe Bağlı';
$lang->ssl_options['always'] = 'Her zaman';
$lang->about_use_ssl = '\'İsteği Bağlı\' seçiminde; SSL, kayıt olma/bilgi değiştirme gibi eylemler için kullanılacaktır. \'Her zaman\' seçiminde, siteniz sadece http yoluyla hizmet verecektir.';
$lang->server_ports = 'Sunucu Bağlantı Noktası (port)';

View file

@ -43,7 +43,6 @@ $lang->xe_license = 'Rhymix sử dụng giấy phép GPL';
$lang->yesterday = 'Hôm qua';
$lang->today = 'Hôm nay';
$lang->ssl_options['none'] = 'Không sử dụng';
$lang->ssl_options['optional'] = 'Tùy chỉnh';
$lang->ssl_options['always'] = 'Luôn luôn';
$lang->about_use_ssl = 'Nếu bạn chọn \'Tùy chỉnh\', SSL sẽ sử dụng và những công việc như đăng kí, sửa thông tin thành viên, . Chỉ chọn \'Luôn luôn\' khi Website của bạn đang chạy trên Server có hỗ trợ https. SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의 바랍니다.';
$lang->server_ports = 'Cổng kết nối';

View file

@ -57,7 +57,6 @@ $lang->about_recompile_cache = '清空cache缓存?';
$lang->confirm_run = '此过程可能需要耗费一段时间,是否继续?';
$lang->use_ssl = '是否使用<abbr title="Secure Sockets Layer">SSL</abbr>安全连接?';
$lang->ssl_options['none'] = '不使用';
$lang->ssl_options['optional'] = '可选(不推荐)';
$lang->ssl_options['always'] = '始终(推荐)';
$lang->about_use_ssl = '<p>选择“可选”是为指定的操作例如注册和更改信息使用SSL。<br />选择“总是”是为Rhymix生成的整个页面使用SSL。</p><p>请小心! 在安装SSL证书之前您可能无法访问该网站。</p>';
$lang->server_ports = '指定服务器端口';

View file

@ -39,7 +39,6 @@ $lang->xe_license = 'Rhymix遵循 GPL協議';
$lang->yesterday = '昨天';
$lang->today = '今天';
$lang->ssl_options['none'] = '關閉';
$lang->ssl_options['optional'] = '可選(不推薦)';
$lang->ssl_options['always'] = '始終(推薦)';
$lang->about_use_ssl = '<p>選擇“可選”是為指定的操作例如註冊和更改信息使用SSL。 <br />選擇“總是”是為Rhymix生成的整個頁面使用SSL。 </p><p>請小心在安裝SSL證書之前您可能無法訪問該網站。</p>';
$lang->server_ports = '主機埠口';

View file

@ -54,9 +54,8 @@
<label class="x_control-label" for="domain_security">{$lang->use_ssl}</label>
<div class="x_controls">
<select id="domain_security" name="domain_security">
<!--@foreach($lang->ssl_options as $key => $val)-->
<option value="{$key}" selected="selected"|cond="($domain_info && $domain_info->security == $key) || (!$domain_info && config('url.ssl') == $key)" />{$val}</option>
<!--@endforeach-->
<option value="none" selected="selected"|cond="($domain_info && $domain_info->security === 'none') || (!$domain_info && config('url.ssl') === 'none')" />{$lang->ssl_options['none']}</option>
<option value="always" selected="selected"|cond="($domain_info && $domain_info->security !== 'none') || (!$domain_info && config('url.ssl') !== 'none')" />{$lang->ssl_options['always']}</option>
</select>
<div class="x_help-block">{lang('admin.about_use_ssl')}</div>
</div>

View file

@ -26,7 +26,6 @@ class installAdminController extends install
$oInstallController->installModule($module_name, './modules/'.$module_name);
$oModuleController = getController('module');
$oModuleController->registerActionForwardRoutes($module_name);
$oModuleController->registerSecureActions($module_name);
$this->setMessage('success_installed');
}
@ -58,12 +57,6 @@ class installAdminController extends install
Rhymix\Framework\Session::start();
return $output;
}
$output = $oModuleController->registerSecureActions($module_name);
if($output instanceof BaseObject && !$output->toBool())
{
Rhymix\Framework\Session::start();
return $output;
}
Rhymix\Framework\Session::start();
$this->setMessage('success_updated');

View file

@ -50,32 +50,6 @@ class moduleController extends module
return $output;
}
/**
* @brief Add action security
*/
function insertActionSecurity($act)
{
$args = new stdClass();
$args->act = $act;
$output = executeQuery('module.insertActionSecurity', $args);
Rhymix\Framework\Cache::delete('action_security');
return $output;
}
/**
* @brief Delete action security
*/
function deleteActionSecurity($act)
{
$args = new stdClass();
$args->act = $act;
$output = executeQuery('module.deleteActionSecurity', $args);
Rhymix\Framework\Cache::delete('action_security');
return $output;
}
/**
* @brief Add trigger callback function
*
@ -1390,28 +1364,6 @@ class moduleController extends module
return new BaseObject();
}
/**
* Check if all secure actions are registered. If not, register them.
*
* @param string $module_name
* @return object
*/
public function registerSecureActions(string $module_name)
{
$action_security = ModuleModel::getActionSecurity();
$module_action_info = ModuleModel::getModuleActionXml($module_name);
foreach ($module_action_info->action ?: [] as $action_name => $action_info)
{
if ($action_info->use_ssl === 'true' && !isset($action_security[$action_name]))
{
$output = $this->insertActionSecurity($action_name);
}
}
return new BaseObject();
}
}
/* End of file module.controller.php */
/* Location: ./modules/module/module.controller.php */

View file

@ -602,38 +602,6 @@ class moduleModel extends module
return $action_forward[$act];
}
/**
* @brief Get SSL action setting
*/
public static function getActionSecurity($act = null)
{
$action_security = Rhymix\Framework\Cache::get('action_security');
if($action_security === null)
{
$args = new stdClass();
$output = executeQueryArray('module.getActionSecurity', $args);
if(!$output->toBool())
{
return;
}
$action_security = array();
foreach($output->data as $item)
{
$action_security[$item->act] = true;
}
Rhymix\Framework\Cache::set('action_security', $action_security, 0, true);
}
if(!isset($act))
{
return $action_security;
}
return isset($action_security[$act]) ? true : false;
}
/**
* @brief Get trigger functions
*/
@ -1379,9 +1347,6 @@ class moduleModel extends module
// Get action forward
$action_forward = self::getActionForward();
// Get action security
$action_security = self::getActionSecurity();
foreach ($searched_list as $module_name)
{
@ -1466,15 +1431,6 @@ class moduleModel extends module
$info->need_update = true;
}
}
// Check if all secure actions are registered
foreach ($module_action_info->action ?: [] as $action_name => $action_info)
{
if ($action_info->use_ssl === 'true' && !isset($action_security[$action_name]))
{
$info->need_update = true;
}
}
}
$list[] = $info;
}

View file

@ -1,8 +0,0 @@
<query id="deleteActionSecurity" action="delete">
<tables>
<table name="action_security" />
</tables>
<conditions>
<condition operation="equal" column="act" var="act" notnull="notnull" />
</conditions>
</query>

View file

@ -1,11 +0,0 @@
<query id="getActionSecurity" action="select">
<tables>
<table name="action_security" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="act" var="act" />
</conditions>
</query>

View file

@ -1,8 +0,0 @@
<query id="insertActionSecurity" action="insert">
<tables>
<table name="action_security" />
</tables>
<columns>
<column name="act" var="act" notnull="notnull" />
</columns>
</query>

View file

@ -1,3 +0,0 @@
<table name="action_security">
<column name="act" type="varchar" size="80" notnull="notnull" primary_key="primary_key" />
</table>