From: Roland Häder Date: Wed, 23 Jan 2013 16:36:30 +0000 (+0000) Subject: Fixes and other improvements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c4caaa266ca1408c4d4dbf99019428e9901d62d;p=mailer.git Fixes and other improvements --- diff --git a/inc/extensions/ext-blacklist.php b/inc/extensions/ext-blacklist.php index a34fdeaed5..988102d3c1 100644 --- a/inc/extensions/ext-blacklist.php +++ b/inc/extensions/ext-blacklist.php @@ -68,16 +68,16 @@ INDEX (`pool_id`)", // Add admin menu addAdminMenuSql('setup', 'config_blacklist', 'Sperrlisten', 'Einstellungen zu den Sperrlisten.', 8); - addAdminMenuSql('misc', 'list_blacklist', 'Sperrlisten...', 'Zeigt gesperrte Email-Adressen und/oder URLs an.', 3); + addAdminMenuSql('misc', 'list_blacklist', 'Sperrlisten...', 'Zeigt gesperrte Email-Adressen, IP-Adressen, URLs und vieles mehr an.', 3); // Add configuration addConfigAddSql('email_blacklist', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('url_blacklist', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Register filters - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'CHECK_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'pre_update_user_data', 'CHECK_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_email_blacklisted', 'LOG_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration' , 'CHECK_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_update_user_data' , 'CHECK_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_email_blacklisted', 'LOG_EMAIL_BLACKLISTED' , FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -85,12 +85,12 @@ INDEX (`pool_id`)", addDropTableSql('blacklist'); // Remove menu - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_blacklist', 'list_blacklist') LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_blacklist', 'list_blacklist')"); // Unregister filters - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'CHECK_EMAIL_BLACKLISTED', TRUE, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_update_user_data', 'CHECK_EMAIL_BLACKLISTED', TRUE, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_email_blacklisted', 'LOG_EMAIL_BLACKLISTED', FALSE, TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration' , 'CHECK_EMAIL_BLACKLISTED', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_update_user_data' , 'CHECK_EMAIL_BLACKLISTED', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_email_blacklisted', 'LOG_EMAIL_BLACKLISTED' , TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index 62bc294d94..4858e62038 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -59,7 +59,8 @@ function checkHtmlTags ($html) { $check = str_replace('/', '', $check); if (!in_array($check, $GLOBALS['html_tags'])) { // Invalid tag found - return ''; + $html = ''; + break; } // END - if $test = substr($test, strpos($test, '>') + 1); } // END - while diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index f0d56c922a..4ee6eab5c1 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -150,10 +150,13 @@ LIMIT 1", // HTML or regular text mail? if (postRequestElement('html') == 'Y') { // Chek for valid HTML tags - setPostRequestElement('text', checkHtmlTags(postRequestElement('text'))); + $checked = checkHtmlTags(postRequestElement('text'))); // Maybe invalid tags found? - if (!isPostRequestElementSet('text')) $data['url'] = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS') . '&id=' . $data['id']; + if (empty($checked)) { + // Invalid HTML tags found + $data['url'] = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS') . '&id=' . $data['id']; + } // END - if } else { // Remove any HTML code setPostRequestElement('text', str_replace(array('<', '>'), array('{OPEN_HTML}', '{CLOSE_HTML}'), postRequestElement('text')));