From cba0488586715d6789b0d42a9ad2c0dcebc50196 Mon Sep 17 00:00:00 2001 From: e107steved Date: Thu, 30 Oct 2008 20:40:22 +0000 Subject: [PATCH] Bugtracker #4563 - blank screen on signup if email address not entered --- e107_files/def_e107_prefs.php | 32 +++++++++++++++++++------------- signup.php | 29 ++++++++++++++++------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/e107_files/def_e107_prefs.php b/e107_files/def_e107_prefs.php index 4f077389a..1fe49555a 100644 --- a/e107_files/def_e107_prefs.php +++ b/e107_files/def_e107_prefs.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_files/def_e107_prefs.php,v $ -| $Revision: 1.15 $ -| $Date: 2008-10-11 11:55:18 $ +| $Revision: 1.16 $ +| $Date: 2008-10-30 20:40:22 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -46,17 +46,31 @@ City, State, Country 'flood_timeout' => '5', 'flood_time' => '30', 'flood_hits' => '100', - 'anon_post' => '0', + 'user_reg' => '1', - 'use_coppa' => '1', 'membersonly_enabled' => '0', + + 'use_coppa' => '1', + 'signcode' => '0', + 'user_reg_veri' => '1', + 'user_reg_secureveri' => '1', 'signup_pass_len' => '', 'signup_maxip' => '3', 'signup_disallow_text' => '', + 'disable_emailcheck' => 0, + 'signup_text' => '', + 'signup_text_after' => '', + 'signup_option_realname' => '1', + 'signup_option_signature' => '1', + 'signup_option_image' => '1', + 'signup_option_class' => '1', + 'signup_remote_emailcheck' => 0, + 'displayname_class' => 255, 'displayname_maxlength' => 15, 'loginname_maxlength' => 30, + 'profanity_filter' => '0', 'profanity_replace' => '[censored]', 'smiley_activate' => '', @@ -68,7 +82,6 @@ City, State, Country 'maintainance_flag' => '0', 'time_offset' => '0', 'meta_tag' => '', - 'user_reg_veri' => '1', 'email_notify' => '0', 'resize_method' => 'gd2', 'im_path' => '/usr/X11R6/bin/', @@ -92,16 +105,11 @@ City, State, Country 'wmessage_sc' => '0', 'frontpage_force' => array(e_UC_PUBLIC => ''), 'frontpage' => array(e_UC_PUBLIC => 'news.php'), - 'signup_text' => '', + 'admin_alerts_ok' => '1', 'link_replace' => '0', 'link_text' => '', - 'signcode' => '0', 'logcode' => '0', - 'signup_option_realname' => '1', - 'signup_option_signature' => '1', - 'signup_option_image' => '1', - 'signup_option_class' => '1', 'newsposts_archive' => '0', 'newsposts_archive_title' => '', 'news_cats' => '', @@ -130,7 +138,6 @@ City, State, Country 'post_html' => '254', 'redirectsiteurl' => '0', 'admin_alerts_uniquemenu' => '0', - 'signup_text_after' => '', 'null' => '', 'links_new_window' => '1', 'main_wordwrap' => '', @@ -138,7 +145,6 @@ City, State, Country 'php_bbcode' => '255', 'ssl_enabled' => '0', 'fpwcode' => '0', - 'user_reg_secureveri' => '1', 'disallowMultiLogin' => '0', 'profanity_words' => '', 'adminpwordchange' => '0', diff --git a/signup.php b/signup.php index 89fb4adc3..2ece23886 100644 --- a/signup.php +++ b/signup.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/signup.php,v $ -| $Revision: 1.21 $ -| $Date: 2008-10-03 19:48:00 $ +| $Revision: 1.22 $ +| $Date: 2008-10-30 20:40:22 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -579,17 +579,19 @@ global $db_debug; $error = TRUE; $email_address_OK = FALSE; } - - // Check Email against banlist. - $wc = $tp -> toDB("*".trim(substr($_POST['email'], strpos($_POST['email'], "@")))); -// if ($do_email_validate && $sql->db_Select("banlist", "*", "banlist_ip='".$_POST['email']."' OR banlist_ip='{$wc}'")) - if ($do_email_validate && !$e107->check_ban("banlist_ip='".$_POST['email']."' OR banlist_ip='{$wc}'",FALSE,TRUE)) + else { - $email_address_OK = FALSE; - $brow = $sql -> db_Fetch(); - $error = TRUE; - $error_message = varsettrue($pref['ban_messages'][$row['banlist_bantype']]); - if (!$error_message) exit; + + // Check Email against banlist. + $wc = $tp -> toDB("*".trim(substr($_POST['email'], strpos($_POST['email'], "@")))); +// if ($do_email_validate && $sql->db_Select("banlist", "*", "banlist_ip='".$_POST['email']."' OR banlist_ip='{$wc}'")) + if ($do_email_validate && !$e107->check_ban("banlist_ip='".$_POST['email']."' OR banlist_ip='{$wc}'",FALSE,TRUE)) + { + $email_address_OK = FALSE; + $brow = $sql -> db_Fetch(); + $error = TRUE; + $error_message = varsettrue($pref['ban_messages'][$row['banlist_bantype']]); + if (!$error_message) exit; /* if($brow['banlist_reason']) { $repl = array("\n","\r","
"); @@ -600,7 +602,8 @@ global $db_debug; { exit; } -*/ } +*/ } + } // Check email address on remote server (if enabled) - but only if previous checks passed. if ($do_email_validate && $email_address_OK && varsettrue($pref['signup_remote_emailcheck']) && $error != TRUE)