diff --git a/lang/ar_AR.ini b/lang/ar_AR.ini index 27021503..4a692b2b 100644 --- a/lang/ar_AR.ini +++ b/lang/ar_AR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/da_DK.ini b/lang/da_DK.ini index e493c7f5..16991457 100644 --- a/lang/da_DK.ini +++ b/lang/da_DK.ini @@ -314,3 +314,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/de_DE.ini b/lang/de_DE.ini index 03ba0303..975a9309 100644 --- a/lang/de_DE.ini +++ b/lang/de_DE.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/de_DE_gender_doppelpunkt.ini b/lang/de_DE_gender_doppelpunkt.ini index 1cbf0e1c..b7a333f5 100644 --- a/lang/de_DE_gender_doppelpunkt.ini +++ b/lang/de_DE_gender_doppelpunkt.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/de_DE_gender_dudenkonform.ini b/lang/de_DE_gender_dudenkonform.ini index ec352563..c61648f8 100644 --- a/lang/de_DE_gender_dudenkonform.ini +++ b/lang/de_DE_gender_dudenkonform.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/el_GR.ini b/lang/el_GR.ini index dbfe748d..fab86b29 100644 --- a/lang/el_GR.ini +++ b/lang/el_GR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/en_US.ini b/lang/en_US.ini index 9923f6c6..a84a0310 100644 --- a/lang/en_US.ini +++ b/lang/en_US.ini @@ -304,4 +304,6 @@ set_mfa_globally = "Set the status of MFA" explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page." set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." -focus_mode = "Toggle Focus" \ No newline at end of file +focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/es_ES.ini b/lang/es_ES.ini index c213a90d..aa728dd1 100644 --- a/lang/es_ES.ini +++ b/lang/es_ES.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/fa_IR.ini b/lang/fa_IR.ini index ea77c057..7a64ae43 100644 --- a/lang/fa_IR.ini +++ b/lang/fa_IR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/fr_FR.ini b/lang/fr_FR.ini index c0885fce..5f006449 100644 --- a/lang/fr_FR.ini +++ b/lang/fr_FR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/gu_GU.ini b/lang/gu_GU.ini index 1bfebad0..63765225 100644 --- a/lang/gu_GU.ini +++ b/lang/gu_GU.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/hi_HI.ini b/lang/hi_HI.ini index b6f0430b..db0f34a5 100644 --- a/lang/hi_HI.ini +++ b/lang/hi_HI.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/hr_HR.ini b/lang/hr_HR.ini index 82bf2598..32552baf 100644 --- a/lang/hr_HR.ini +++ b/lang/hr_HR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/hu_HU.ini b/lang/hu_HU.ini index 16cf74c2..75efef72 100644 --- a/lang/hu_HU.ini +++ b/lang/hu_HU.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/id_ID.ini b/lang/id_ID.ini index 68ef18e2..c6e220b6 100644 --- a/lang/id_ID.ini +++ b/lang/id_ID.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/it_IT.ini b/lang/it_IT.ini index f9534375..f1b7a42a 100644 --- a/lang/it_IT.ini +++ b/lang/it_IT.ini @@ -305,3 +305,5 @@ explain_mfa = "Una volta abilitata, la MFA è facoltativa per tutti gli utenti. set_version_publicly = "Visibilità della versione" explain_version = "Per impostazione predefinita la versione di HTMLy è visibile a tutti nel codice sorgente, alcuni amministratori preferirebbero nasconderla." focus_mode = "Cambia visuale" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/ko_KO.ini b/lang/ko_KO.ini index c169f532..98ece8e5 100644 --- a/lang/ko_KO.ini +++ b/lang/ko_KO.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/ms_MY.ini b/lang/ms_MY.ini index 6118b695..55865733 100644 --- a/lang/ms_MY.ini +++ b/lang/ms_MY.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/nl_NL.ini b/lang/nl_NL.ini index c277aff6..c07a22ce 100644 --- a/lang/nl_NL.ini +++ b/lang/nl_NL.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/pl_PL.ini b/lang/pl_PL.ini index de13381d..56300088 100644 --- a/lang/pl_PL.ini +++ b/lang/pl_PL.ini @@ -304,3 +304,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/pt_BR.ini b/lang/pt_BR.ini index 33bc95c9..c54b6840 100644 --- a/lang/pt_BR.ini +++ b/lang/pt_BR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/ru_RU.ini b/lang/ru_RU.ini index fe055dd9..cb0001b0 100644 --- a/lang/ru_RU.ini +++ b/lang/ru_RU.ini @@ -304,3 +304,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/sv_SE.ini b/lang/sv_SE.ini index 60ea18f0..bcbc66c4 100644 --- a/lang/sv_SE.ini +++ b/lang/sv_SE.ini @@ -315,3 +315,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/tr_TR.ini b/lang/tr_TR.ini index f67eabc9..95d003e7 100644 --- a/lang/tr_TR.ini +++ b/lang/tr_TR.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/uk_UA.ini b/lang/uk_UA.ini index bd21bbd2..ae134f61 100644 --- a/lang/uk_UA.ini +++ b/lang/uk_UA.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/zh_CN.ini b/lang/zh_CN.ini index 056d3c8e..58dcaa12 100644 --- a/lang/zh_CN.ini +++ b/lang/zh_CN.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/lang/zh_TW.ini b/lang/zh_TW.ini index 7d63f542..eab6fd56 100644 --- a/lang/zh_TW.ini +++ b/lang/zh_TW.ini @@ -303,3 +303,5 @@ explain_mfa = "When enabled, MFA is optional for all users. When disabled, no us set_version_publicly = "Version Visibility" explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this." focus_mode = "Toggle Focus" +security = "Security" +security_settings = "Security Settings" diff --git a/system/admin/views/config-custom.html.php b/system/admin/views/config-custom.html.php index bea78fc2..50d195d6 100644 --- a/system/admin/views/config-custom.html.php +++ b/system/admin/views/config-custom.html.php @@ -8,6 +8,7 @@ + diff --git a/system/admin/views/config-metatags.html.php b/system/admin/views/config-metatags.html.php index 14b59edf..a3437592 100644 --- a/system/admin/views/config-metatags.html.php +++ b/system/admin/views/config-metatags.html.php @@ -61,6 +61,7 @@ + diff --git a/system/admin/views/config-performance.html.php b/system/admin/views/config-performance.html.php index fd4ccd4c..b6a0ded3 100644 --- a/system/admin/views/config-performance.html.php +++ b/system/admin/views/config-performance.html.php @@ -8,6 +8,7 @@ + diff --git a/system/admin/views/config-reading.html.php b/system/admin/views/config-reading.html.php index b194a69c..ee9ce39a 100644 --- a/system/admin/views/config-reading.html.php +++ b/system/admin/views/config-reading.html.php @@ -8,6 +8,7 @@ + diff --git a/system/admin/views/config-security.html.php b/system/admin/views/config-security.html.php new file mode 100644 index 00000000..55dfe003 --- /dev/null +++ b/system/admin/views/config-security.html.php @@ -0,0 +1,88 @@ + +

+
+ +

+
+ +

+
+

https://www.google.com/recaptcha/admin +

https://developers.cloudflare.com/turnstile/ +

+ +
+
+
+ checked> + +
+
+ checked> + +
+
+ checked> + +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+

+
+
+ +
+
+
+ checked> + +
+
+ checked> + +
+
+ +
+
+
+
+ +
+
+
diff --git a/system/admin/views/config-widget.html.php b/system/admin/views/config-widget.html.php index 1eea99f8..b1343027 100644 --- a/system/admin/views/config-widget.html.php +++ b/system/admin/views/config-widget.html.php @@ -8,6 +8,7 @@ + @@ -173,48 +174,6 @@
-

-
-

https://www.google.com/recaptcha/admin -

https://developers.cloudflare.com/turnstile/ -

- -
-
-
- checked> - -
-
- checked> - -
-
- checked> - -
-
-
-
-
- -
- -
-
-
- -
- -
-
-


@@ -288,30 +247,6 @@
-
-

-
-
- -
-
-
- checked> - -
-
- checked> - -
-
- -
-
-
diff --git a/system/admin/views/config-writing.html.php b/system/admin/views/config-writing.html.php index 959add18..dd9dcf11 100644 --- a/system/admin/views/config-writing.html.php +++ b/system/admin/views/config-writing.html.php @@ -8,6 +8,7 @@ +
diff --git a/system/admin/views/config.html.php b/system/admin/views/config.html.php index d1b447e9..80ed94db 100644 --- a/system/admin/views/config.html.php +++ b/system/admin/views/config.html.php @@ -21,6 +21,7 @@ +
diff --git a/system/htmly.php b/system/htmly.php index 4ba83fa8..2914e6d9 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -2074,6 +2074,77 @@ } }); +// Show Config page +get('/admin/config/security', function () { + + $user = $_SESSION[site_url()]['user']; + $role = user('role', $user); + + if (login()) { + config('views.root', 'system/admin/views'); + if ($role === 'admin') { + render('config-security', array( + 'title' => generate_title('is_default', i18n('Config')), + 'description' => safe_html(strip_tags(blog_description())), + 'canonical' => site_url(), + 'metatags' => generate_meta(null, null), + 'type' => 'is_admin-config', + 'is_admin' => true, + 'bodyclass' => 'admin-config', + 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Config') + )); + } else { + render('denied', array( + 'title' => generate_title('is_default', i18n('Config')), + 'description' => safe_html(strip_tags(blog_description())), + 'canonical' => site_url(), + 'metatags' => generate_meta(null, null), + 'type' => 'is_admin-config', + 'is_admin' => true, + 'bodyclass' => 'denied', + 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Config') + )); + } + } else { + $login = site_url() . 'login'; + header("location: $login"); + } +}); + +// Submitted Config page data +post('/admin/config/security', function () { + + $proper = is_csrf_proper(from($_REQUEST, 'csrf_token')); + if (login() && $proper) { + $new_config = array(); + $new_Keys = array(); + $user = $_SESSION[site_url()]['user']; + $role = user('role', $user); + if ($role === 'admin') { + foreach ($_POST as $name => $value) { + if (substr($name, 0, 8) == "-config-") { + $name = str_replace("_", ".", substr($name, 8)); + if(!is_null(config($name))) { + $new_config[$name] = $value; + } else { + $new_Keys[$name] = $value; + } + } + } + save_config($new_config, $new_Keys); + $redir = site_url() . 'admin/config/security'; + header("location: $redir"); + } else { + $redir = site_url(); + header("location: $redir"); + } + } else { + $login = site_url() . 'login'; + header("location: $login"); + } +}); + + // Show Config page get('/admin/config/performance', function () {