From 1ac142347ef7e0d74faa148f03fc991fb0cec526 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 18 Aug 2020 08:23:23 +0200 Subject: [PATCH 1/4] [ticket/16580] Update rendering tests to match actual Prosilver PHPBB3-16580 --- tests/test_framework/phpbb_test_case_helpers.php | 2 +- .../text_formatter/s9e/default_formatting_test.php | 14 +++++++------- .../s9e/fixtures/default_formatting.xml | 2 +- tests/text_formatter/s9e/fixtures/factory.xml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 9a2ea275d0..ce394fc510 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -402,7 +402,7 @@ class phpbb_test_case_helpers $tables['phpbb_styles'][] = array( 'style_id' => 1, 'style_path' => 'prosilver', - 'bbcode_bitfield' => 'kNg=' + 'bbcode_bitfield' => '//g=' ); } diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php index 28f7061fc3..a0f587d093 100644 --- a/tests/text_formatter/s9e/default_formatting_test.php +++ b/tests/text_formatter/s9e/default_formatting_test.php @@ -50,7 +50,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case return array( array( '[b]bold[/b]', - 'bold' + 'bold' ), array( '[u]underlined[/u]', @@ -58,7 +58,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case ), array( '[i]italic[/i]', - 'italic' + 'italic' ), array( '[color=#FF0000]colored[/color]', @@ -70,7 +70,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case ), array( '[size=75]smaller[/size]', - 'smaller' + 'smaller' ), array( '[quote]quoted[/quote]', @@ -184,17 +184,17 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case array( // Allow textual bbcodes in textual bbcodes '[b]bold [i]bold + italic[/i][/b]', - 'bold bold + italic' + 'bold bold + italic' ), array( // Allow textual bbcodes in url with description '[url=https://area51.phpbb.com/]Area51 [i]italic[/i][/url]', - 'Area51 italic' + 'Area51 italic' ), array( // Allow url with description in textual bbcodes '[i]italic [url=https://area51.phpbb.com/]Area51[/url][/i]', - 'italic Area51' + 'italic Area51' ), array( // Do not parse textual bbcodes in code @@ -209,7 +209,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case array( // Textual bbcode nesting into textual bbcode '[b]bold [i]bold + italic[/b] italic[/i]', - 'bold bold + italic italic' + 'bold bold + italic italic' ), array( "[code]\tline1\n line2[/code]", diff --git a/tests/text_formatter/s9e/fixtures/default_formatting.xml b/tests/text_formatter/s9e/fixtures/default_formatting.xml index 2b7236fb30..54ac66db32 100644 --- a/tests/text_formatter/s9e/fixtures/default_formatting.xml +++ b/tests/text_formatter/s9e/fixtures/default_formatting.xml @@ -446,7 +446,7 @@ © phpBB Group 1 prosilver - kNg= + //g= 0 diff --git a/tests/text_formatter/s9e/fixtures/factory.xml b/tests/text_formatter/s9e/fixtures/factory.xml index 9ae52e9747..728ef3a370 100644 --- a/tests/text_formatter/s9e/fixtures/factory.xml +++ b/tests/text_formatter/s9e/fixtures/factory.xml @@ -95,7 +95,7 @@ © phpBB Group 1 prosilver - kNg= + //g= 0 From 62333f0ca2f50641790c823f8910bc614ef42bd9 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 18 Aug 2020 11:54:15 +0200 Subject: [PATCH 2/4] [ticket/16580] Updated regression tests PHPBB3-16580 --- tests/text_processing/tickets_data/PHPBB3-10268.html | 4 ++-- tests/text_processing/tickets_data/PHPBB3-13921.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/text_processing/tickets_data/PHPBB3-10268.html b/tests/text_processing/tickets_data/PHPBB3-10268.html index 13b71b4823..3fa1c8cc4e 100644 --- a/tests/text_processing/tickets_data/PHPBB3-10268.html +++ b/tests/text_processing/tickets_data/PHPBB3-10268.html @@ -1,4 +1,4 @@
http://phpbb.com wrote:...
http://phpbb.com wrote:...
-http://phpbb.com
- http://phpbb.com
+http://phpbb.com
+ http://phpbb.com
diff --git a/tests/text_processing/tickets_data/PHPBB3-13921.html b/tests/text_processing/tickets_data/PHPBB3-13921.html index 6a9dc7f504..9dc726d40f 100644 --- a/tests/text_processing/tickets_data/PHPBB3-13921.html +++ b/tests/text_processing/tickets_data/PHPBB3-13921.html @@ -1 +1 @@ -
xxx
\ No newline at end of file +
xxx
\ No newline at end of file From 762d9fcf7b4499da87fd913cc629a999d782d239 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 18 Aug 2020 12:11:40 +0200 Subject: [PATCH 3/4] [ticket/16580] Updated email-related test This ensures that re-activating email fields does not introduce any exploit PHPBB3-16580 --- tests/text_processing/tickets_data/PHPBB3-10922.html | 1 + tests/text_processing/tickets_data/PHPBB3-10922.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/text_processing/tickets_data/PHPBB3-10922.html b/tests/text_processing/tickets_data/PHPBB3-10922.html index 3ff117f171..1e5d1960a4 100644 --- a/tests/text_processing/tickets_data/PHPBB3-10922.html +++ b/tests/text_processing/tickets_data/PHPBB3-10922.html @@ -7,3 +7,4 @@ user@example.org
user@example.org
...
+user@example.org
diff --git a/tests/text_processing/tickets_data/PHPBB3-10922.txt b/tests/text_processing/tickets_data/PHPBB3-10922.txt index e533ce6ed5..76a34235fb 100644 --- a/tests/text_processing/tickets_data/PHPBB3-10922.txt +++ b/tests/text_processing/tickets_data/PHPBB3-10922.txt @@ -7,3 +7,4 @@ [email subject="Hello" body="Sent from phpBB"]user@example.org[/email] [email body="Sent from phpBB" subject="Hello"]user@example.org[/email] [email body="Sent from phpBB" subject="Hello" email="user@example.org"]...[/email] +[email subject="hi&attach=foo"]user@example.org[/email] From 9efa7c1a8ca5ddf1a22bfca0cabe3fc7162aa4c6 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Thu, 20 Aug 2020 14:36:11 +0200 Subject: [PATCH 4/4] [ticket/16580] Fixed email template in bbcode.html Relates to #4976 PHPBB3-16580 --- phpBB/styles/prosilver/template/bbcode.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html index 54922620c4..2780d869d2 100644 --- a/phpBB/styles/prosilver/template/bbcode.html +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -77,6 +77,19 @@ {DESCRIPTION} -{DESCRIPTION} + + + + mailto: + + + ? + subject= + &body= + + + + +