From 924d7b8fdda90cee5754f62b2cf1c68e0d97855d Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Fri, 1 May 2015 08:22:21 +0000 Subject: [PATCH] Domain Settings: Obfuscate sensitive values. Enhanced/Minimized Theme: Adjust styles allowing ability to completely turn off login/menu/body/footer shadows and quicker opacity control (via default/domain settings), add default/domain setting domain_shadow_color (Enhanced only). --- .../default_settings/default_setting_edit.php | 3 +- core/default_settings/default_settings.php | 6 +- core/domain_settings/domain_setting_edit.php | 9 +- core/domain_settings/domain_settings.php | 16 ++-- themes/enhanced/app_defaults.php | 9 +- themes/enhanced/template.php | 80 +++++++++++----- themes/minimized/template.php | 92 +++++++++++++------ 7 files changed, 148 insertions(+), 67 deletions(-) diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 364cae418d..447828e6fe 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2014 + Portions created by the Initial Developer are Copyright (C) 2008-2015 the Initial Developer. All Rights Reserved. Contributor(s): @@ -411,6 +411,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $category == "theme" && $subcategory == "login_shadow_color" && $name == "text" || $category == "theme" && $subcategory == "login_background_color" && $name == "text" || $category == "theme" && $subcategory == "domain_color" && $name == "text" || + $category == "theme" && $subcategory == "domain_shadow_color" && $name == "text" || $category == "theme" && $subcategory == "domain_background_color" && $name == "text" || $category == "theme" && $subcategory == "footer_color" && $name == "text" || $category == "theme" && $subcategory == "footer_background_color" && $name == "text" || diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index 6da0496ccb..e4e8313d0e 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2014 + Portions created by the Initial Developer are Copyright (C) 2008-2015 the Initial Developer. All Rights Reserved. Contributor(s): @@ -376,7 +376,8 @@ else { else { echo $row['default_setting_subcategory']; } - echo " ".$row['default_setting_name']."\n"; + echo " \n"; + echo " ".$row['default_setting_name']." \n"; echo " \n"; $category = $row['default_setting_category']; @@ -388,6 +389,7 @@ else { $sub_prep_statement = $db->prepare(check_sql($sql)); $sub_prep_statement->execute(); $sub_result = $sub_prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); foreach ($sub_result as &$sub_row) { echo $sub_row["menu_language"]." - ".$sub_row["menu_name"]."\n"; } diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index f6961fd6ba..c89ce615a7 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2015 the Initial Developer. All Rights Reserved. Contributor(s): @@ -429,16 +429,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } echo " \n"; } - elseif ($category == "email" && $subcategory == "smtp_password" && $name == "var" ) { - echo " \n"; - } - elseif ($category == "provision" && $subcategory == "password" && $name == "var" ) { + elseif ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || $category == "login" && $subcategory == "password_reset_key" && $name == "text") { echo " \n"; } elseif ( $category == "theme" && $subcategory == "background_color" && $name == "array" || + $category == "theme" && $subcategory == "login_shadow_color" && $name == "text" || $category == "theme" && $subcategory == "login_background_color" && $name == "text" || $category == "theme" && $subcategory == "domain_color" && $name == "text" || + $category == "theme" && $subcategory == "domain_shadow_color" && $name == "text" || $category == "theme" && $subcategory == "domain_background_color" && $name == "text" || $category == "theme" && $subcategory == "footer_color" && $name == "text" || $category == "theme" && $subcategory == "footer_background_color" && $name == "text" || diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index e8a4671261..a776de04d9 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2014 + Portions created by the Initial Developer are Copyright (C) 2008-2015 the Initial Developer. All Rights Reserved. Contributor(s): @@ -208,7 +208,7 @@ if (sizeof($_REQUEST) > 1) { } echo " \n"; echo " ".$row['domain_setting_name']." \n"; - echo " \n"; + echo " \n"; $category = $row['domain_setting_category']; $subcategory = $row['domain_setting_subcategory']; @@ -227,13 +227,11 @@ if (sizeof($_REQUEST) > 1) { elseif ($category == "domain" && $subcategory == "template" && $name == "name" ) { echo " ".ucwords($row['domain_setting_value']); } - elseif ($category == "email" && $subcategory == "smtp_password" && $name == "var" ) { - echo " ********  \n"; + else if ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || $category == "login" && $subcategory == "password_reset_key" && $name == "text") { + echo " ".str_repeat('*', strlen($row['domain_setting_value'])); } - elseif ($category == "provision" && $subcategory == "password" && $name == "var" ) { - echo " ********  \n"; - } else { - echo " ".substr($row['domain_setting_value'],0,58); + else { + echo " ".htmlspecialchars($row['domain_setting_value']); } echo "  \n"; echo " \n"; @@ -243,7 +241,7 @@ if (sizeof($_REQUEST) > 1) { echo " ".$row['domain_setting_description']." \n"; echo " "; if (permission_exists('domain_setting_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('domain_setting_delete')) { echo "$v_link_label_delete"; diff --git a/themes/enhanced/app_defaults.php b/themes/enhanced/app_defaults.php index a32f548125..cba5714ba7 100644 --- a/themes/enhanced/app_defaults.php +++ b/themes/enhanced/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2015 the Initial Developer. All Rights Reserved. Contributor(s): @@ -64,6 +64,13 @@ if ($domains_processed == 1) { $array[$x]['default_setting_description'] = 'Set the text color for domain name.'; $x++; $array[$x]['default_setting_category'] = 'theme'; + $array[$x]['default_setting_subcategory'] = 'domain_shadow_color'; + $array[$x]['default_setting_name'] = 'text'; + $array[$x]['default_setting_value'] = '#ffffff'; + $array[$x]['default_setting_enabled'] = 'true'; + $array[$x]['default_setting_description'] = 'Set the text shadow color for domain name (Enhanced theme only).'; + $x++; + $array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_subcategory'] = 'domain_background_color'; $array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_value'] = '#000000'; diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index 0b0c0bd356..4a8c7796cf 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -112,10 +112,14 @@ if ( -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 20px ; - -moz-box-shadow: 0 1px 20px ; - box-shadow: 0 1px 20px ; + -webkit-box-shadow: 0 1px 20px ; + -moz-box-shadow: 0 1px 20px ; + box-shadow: 0 1px 20px ; + } @@ -133,11 +137,17 @@ DIV#footer { left: 0; right: 0; height: 20px; - -khtml-opacity: ; - -moz-opacity: ; - filter: alpha(opacity=); - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=); - opacity: ; + + -khtml-opacity: ; + -moz-opacity: ; + filter: alpha(opacity=); + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=); + opacity: ; + text-align: center; vertical-align: middle; padding-bottom: 0; @@ -564,16 +574,28 @@ legend { )) { ?> background-color: #FFFFFF; background-attachment: fixed; - opacity: ; - filter:alpha(opacity=); - -moz-opacity: ; - -khtml-opacity: ; + + opacity: ; + filter:alpha(opacity=); + -moz-opacity: ; + -khtml-opacity: ; + -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 4px ; - -moz-box-shadow: 0 1px 4px ; - box-shadow: 0 1px 4px ; + + -webkit-box-shadow: 0 1px 4px ; + -moz-box-shadow: 0 1px 4px ; + box-shadow: 0 1px 4px ; + padding: 20px; padding: 10px; @@ -590,9 +612,15 @@ legend { -moz-border-radius: 4px; border-radius: 4px; padding: 4px; - -webkit-box-shadow: 0 1px 4px ; - -moz-box-shadow: 0 1px 4px ; - box-shadow: 0 1px 4px ; + + -webkit-box-shadow: 0 1px 4px ; + -moz-box-shadow: 0 1px 4px ; + box-shadow: 0 1px 4px ; + } .menu_bg { @@ -697,9 +725,15 @@ legend { -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; - -webkit-box-shadow: 0 2px 3px ; - -moz-box-shadow: 0 2px 3px ; - box-shadow: 0 2px 3px ; + + -webkit-box-shadow: 0 2px 3px ; + -moz-box-shadow: 0 2px 3px ; + box-shadow: 0 2px 3px ; + } #menu a:hover{ @@ -888,8 +922,8 @@ legend { -moz-border-radius: 1px; border-radius: 1px; font-size: 12px; - color: ; - text-shadow: 0 0 2px #fff; + color: ; + } #domain_selector_domain:hover { diff --git a/themes/minimized/template.php b/themes/minimized/template.php index a4bf7a2f65..6af07a2011 100644 --- a/themes/minimized/template.php +++ b/themes/minimized/template.php @@ -112,10 +112,14 @@ if ( -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 20px ; - -moz-box-shadow: 0 1px 20px ; - box-shadow: 0 1px 20px ; + -webkit-box-shadow: 0 1px 20px ; + -moz-box-shadow: 0 1px 20px ; + box-shadow: 0 1px 20px ; + } @@ -133,11 +137,17 @@ DIV#footer { left: 0; right: 0; height: 20px; - -khtml-opacity: ; - -moz-opacity: ; - filter: alpha(opacity=); - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=); - opacity: ; + + -khtml-opacity: ; + -moz-opacity: ; + filter: alpha(opacity=); + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=); + opacity: ; + text-align: center; vertical-align: middle; padding-bottom: 0; @@ -564,16 +574,28 @@ legend { )) { ?> background-color: #FFFFFF; background-attachment: fixed; - opacity: ; - filter:alpha(opacity=); - -moz-opacity: ; - -khtml-opacity: ; + + opacity: ; + filter:alpha(opacity=); + -moz-opacity: ; + -khtml-opacity: ; + -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 4px ; - -moz-box-shadow: 0 1px 4px ; - box-shadow: 0 1px 4px ; + + -webkit-box-shadow: 0 1px 4px ; + -moz-box-shadow: 0 1px 4px ; + box-shadow: 0 1px 4px ; + padding: 15px 20px 20px 20px; padding: 5px 10px 10px 10px; @@ -597,16 +619,28 @@ legend { background-position: 0px -1px; background-repeat: repeat-x; background-color: #000000; - opacity: ; - filter:alpha(opacity=); - -moz-opacity: ; - -khtml-opacity: ; + + opacity: ; + filter:alpha(opacity=); + -moz-opacity: ; + -khtml-opacity: ; + -webkit-border-radius: 0px 0px 4px 4px; -moz-border-radius: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; - -webkit-box-shadow: 0 3px 5px ; - -moz-box-shadow: 0 3px 5px ; - box-shadow: 0 3px 5px ; + + -webkit-box-shadow: 0 3px 5px ; + -moz-box-shadow: 0 3px 5px ; + box-shadow: 0 3px 5px ; + } .menu_bg { @@ -702,9 +736,15 @@ legend { -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; - -webkit-box-shadow: 0 2px 3px ; - -moz-box-shadow: 0 2px 3px ; - box-shadow: 0 2px 3px ; + + -webkit-box-shadow: 0 2px 3px ; + -moz-box-shadow: 0 2px 3px ; + box-shadow: 0 2px 3px ; + } #menu a:hover{ @@ -887,7 +927,7 @@ legend { opacity: 0.8; -moz-opacity: 0.8; -khtml-opacity: 0.8; - color: #fff; + color: ; } #domain_selector_domain:hover {