From ef7a7cac6dc3f313960a70462b084fbeaff9d4bd Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Fri, 19 Jul 2013 18:27:25 +0100 Subject: [ticket/11655] generate_text_for_display on ucp_pm_viewmessage.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b7d2dd6821..0a8a3d55ab 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,17 +76,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $message = censor_text($message_row['message_text']); - - // Second parse bbcode here - if ($message_row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']); - } - - // Always process smilies after parsing bbcodes - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); // Replace naughty words such as farty pants $message_row['message_subject'] = censor_text($message_row['message_subject']); @@ -160,21 +150,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = censor_text($signature); - - if ($user_info['user_sig_bbcode_bitfield']) - { - if ($bbcode === false) - { - include($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']); - } - - $bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']); - } - - $signature = bbcode_nl2br($signature); - $signature = smiley_text($signature); + $signature = generate_text_for_display($signature, $user_info['bbcode_uid'], $user_info['bbcode_bitfield'], ($user_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); -- cgit v1.2.1 From 43b172c8aabbfbcc5180a3f3ad5daede45fcc041 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:44:24 +0100 Subject: [ticket/11655] wrong var names for the uid and for the bitfield sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 0a8a3d55ab..52a28e3552 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -150,7 +150,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = generate_text_for_display($signature, $user_info['bbcode_uid'], $user_info['bbcode_bitfield'], ($user_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); -- cgit v1.2.1 From 603dc1f78617e64e41f61daf85f463b0465123ec Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 20 Jul 2013 15:09:28 +0200 Subject: [ticket/11717] Use topic_posts_approved instead of topic_replies Due to the move to soft-delete, the topic_replies column no longer exists in the topics table. Instead, the column topic_posts_approved should be used. PHPBB3-11717 --- phpBB/includes/ucp/ucp_prefs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 7c3286c1d1..f24578da84 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -267,7 +267,7 @@ class ucp_prefs $limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); - $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); + $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views'); // Post ordering options $limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); -- cgit v1.2.1 From 974da6449c2f18f52086bd5ee6d24aafed046e37 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 22 Jul 2013 22:00:27 +0200 Subject: [ticket/11723] Correctly redirect user to agreement page and let him leave This patch consists of two changes. The first one will make sure that $agree is correctly reset to 0 and the user redirected back to the agreement page after changing the display language. Secondly, by reseting 'change_lang', the user will be able to agree to the terms on the agreement page again. The changed language will still be kept, as this is correctly saved in the 'lang' field that is passed to the ucp_register page. The variable $agree has also been changed to be boolean. It is not used as an integer anywere in the ucp_register file. PHPBB3-11723 --- phpBB/includes/ucp/ucp_register.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 70fbfe46fb..7bc7ac8191 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -38,7 +38,7 @@ class ucp_register include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false; - $agreed = (int) $request->variable('agreed', false); + $agreed = $request->variable('agreed', false); $submit = $request->is_set_post('submit'); $change_lang = request_var('change_lang', ''); $user_lang = request_var('lang', $user->lang_name); @@ -63,7 +63,7 @@ class ucp_register $submit = false; // Setting back agreed to let the user view the agreement in his/her language - $agreed = ($request->variable('change_lang', false)) ? 0 : $agreed; + $agreed = false; } $user->lang_name = $user_lang = $use_lang; @@ -89,7 +89,7 @@ class ucp_register $add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : ''; $s_hidden_fields = array( - 'change_lang' => $change_lang, + 'change_lang' => '', ); // If we change the language, we want to pass on some more possible parameter. -- cgit v1.2.1 From 866e475f9644dd3575ed62bfb0e7dde0338fd5cc Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 25 Jul 2013 15:47:55 +0200 Subject: [ticket/10037] Apply attached patch with a few changes PHPBB3-10037 --- phpBB/includes/ucp/ucp_profile.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index d35d13b6c1..847311058b 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -548,6 +548,9 @@ class ucp_profile // Build custom bbcodes array display_custom_bbcodes(); + // Generate smiley listing + generate_smilies('inline', 0); + break; case 'avatar': -- cgit v1.2.1 From c2aff70cf561c1787be6cdaa193432d0cbdf432d Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:03:04 +0100 Subject: [ticket/11655] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 52a28e3552..8e7ae49fa4 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,7 +76,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES + $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true); // Replace naughty words such as farty pants $message_row['message_subject'] = censor_text($message_row['message_subject']); -- cgit v1.2.1 From c806375828c01c011915f1438f718349aaaaf282 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:09:11 +0100 Subject: [ticket/11653] Missing ";" sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 8e7ae49fa4..79c4297858 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,7 +76,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES + $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true); // Replace naughty words such as farty pants -- cgit v1.2.1 From 3ae33910fc600ae86f0036370958bd7ec19e7ab9 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:14:34 +0100 Subject: [ticket/11653] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 79c4297858..c7b4489daf 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -151,7 +151,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); -- cgit v1.2.1 From 5f81d66c2f666c1825950228e87e7ac6c6b4ca2c Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 23 Aug 2013 03:55:26 +0200 Subject: [ticket/11799] Send anti abuse headers in "new password" emails. PHPBB3-11799 --- phpBB/includes/ucp/ucp_remind.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index cb89ad99be..bcb21cbedc 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -98,6 +98,8 @@ class ucp_remind $messenger->to($user_row['user_email'], $user_row['username']); $messenger->im($user_row['user_jabber'], $user_row['username']); + $messenger->anti_abuse_headers($config, $user); + $messenger->assign_vars(array( 'USERNAME' => htmlspecialchars_decode($user_row['username']), 'PASSWORD' => htmlspecialchars_decode($user_password), -- cgit v1.2.1