aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/INSTALL.html34
-rw-r--r--phpBB/docs/sphinx.sample.conf1
-rw-r--r--phpBB/includes/functions_module.php2
-rw-r--r--phpBB/includes/mcp/mcp_topic.php4
-rw-r--r--phpBB/includes/message_parser.php3
-rw-r--r--phpBB/phpbb/feed/controller/feed.php7
-rw-r--r--phpBB/phpbb/passwords/driver/argon2i.php21
-rw-r--r--phpBB/phpbb/search/fulltext_native.php2
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php1
-rw-r--r--phpBB/search.php5
10 files changed, 49 insertions, 31 deletions
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index fbc701a2ca..7d759b42f0 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.3.x Installation, updating and conversion informations" />
+<meta name="description" content="phpBB 3.3.x Installation, updating and conversion information" />
<title>phpBB &bull; Install</title>
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
@@ -22,7 +22,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>phpBB 3.3.x Install</h1>
- <p>phpBB 3.3.x Installation, updating and conversion informations</p>
+ <p>phpBB 3.3.x Installation, updating and conversion information</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -101,18 +101,18 @@
<div class="content">
- <p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB3 you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
+ <p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
<ol>
- <li>Decompress the phpBB3 archive to a local directory on your system.</li>
+ <li>Decompress the phpBB archive to a local directory on your system.</li>
<li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.</li>
<li>Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)</li>
<li>Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):<br />
<code>store/</code>, <code>cache/</code>, <code>files/</code> and <code>images/avatars/upload/</code>.</li>
- <li>Point your web browser to the location where you uploaded the phpBB3 files with the addition of <code>install/app.php</code> or simply <code>install/</code>, e.g. <code>http://www.example.com/phpBB3/install/app.php</code>, <code>http://www.example.com/forum/install/</code>.</li>
+ <li>Point your web browser to the location where you uploaded the phpBB files with the addition of <code>install/app.php</code> or simply <code>install/</code>, e.g. <code>http://www.example.com/phpBB3/install/app.php</code>, <code>http://www.example.com/forum/install/</code>.</li>
<li>Click the <strong><em>INSTALL</em></strong> tab, follow the steps and fill out all the requested information.</li>
<li>Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
- <li>phpBB3 should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions, and also take note of <a href="#anti_spam">Section 7</a> regarding anti-spam measures.</li>
+ <li>phpBB should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions, and also take note of <a href="#anti_spam">Section 7</a> regarding anti-spam measures.</li>
</ol>
<p>If you experienced problems or do not know how to proceed with any of the steps above please read the rest of this document.</p>
@@ -133,7 +133,7 @@
<div class="content">
- <p>phpBB 3.2.x has a few requirements which must be met before you are able to install and use it.</p>
+ <p>phpBB 3.3.x has a few requirements which must be met before you are able to install and use it.</p>
<ul>
<li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
@@ -147,7 +147,7 @@
<li>Oracle</li>
</ul>
</li>
- <li><strong>PHP 7.1.0+</strong> up to and including <strong>PHP 7.4</strong> with support for the database you intend to use.</li>
+ <li><strong>PHP 7.1.3+</strong> up to and including <strong>PHP 7.4</strong> with support for the database you intend to use.</li>
<li>The following PHP modules are required:
<ul>
<li>json</li>
@@ -353,7 +353,7 @@
<li>(The <code>ext/</code> directory</li>
</ul></li>
- <li>Upload the contents of the 3.3.x Full Package into your forum's directory. Make sure the root level .htaccess file is included in the upload.</li>
+ <li>Upload the contents of the 3.3.x Full Package (<strong>except</strong> for config.php) into your forum's directory. Make sure the root level .htaccess file is included in the upload.</li>
<li>Browse to <code>/install/app.php/update</code></li>
<li>Read the notice <em>Update database only</em> and press <strong>Submit</strong></li>
<li>Delete the <code>install/</code> directory</li>
@@ -374,21 +374,21 @@
<div class="content">
-<p>This paragraph explains the steps necessary to convert your existing phpBB2 installation to phpBB3.</p>
+<p>This paragraph explains the steps necessary to convert your existing phpBB2 installation to phpBB 3.x.</p>
<a name="prereq"></a><h3>5.i. Requirements before converting</h3>
- <p>Before converting, we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this, please ask your hosting provider for advice. You basically need to follow the instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
+ <p>Before converting, we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this, please ask your hosting provider for advice. You basically need to follow the instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB 3.x at a different location.</p>
- <p>Once you made a backup of everything and also have a brand new phpBB3 installation, you can now begin the conversion.</p>
+ <p>Once you made a backup of everything and also have a brand new phpBB 3.x installation, you can now begin the conversion.</p>
- <p>Note that the conversion requires <code>CREATE</code> and <code>DROP</code> privileges for the phpBB3 database user account.</p>
+ <p>Note that the conversion requires <code>CREATE</code> and <code>DROP</code> privileges for the phpBB 3.x database user account.</p>
<a name="conversion"></a><h3>5.ii. Converting</h3>
- <p>To begin the conversion, visit the <code>install/</code> folder of your phpBB3 installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
+ <p>To begin the conversion, visit the <code>install/</code> folder of your phpBB 3.x installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
- <p>As with install, the conversion is automated. Your previous 2.0.x database tables will not be changed and the original 2.0.x files will remain unaltered. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong, you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend that you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
+ <p>As with install, the conversion is automated. Your previous 2.0.x database tables will not be changed and the original 2.0.x files will remain unaltered. The conversion is actually only filling your phpBB 3.x database tables and copying additional data over to your phpBB 3.x installation. This has the benefit that if something goes wrong, you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend that you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
<p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server resource limits or other timeout issues). If this is the case, you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful). If your host is unwilling to increase the limits to run the convertor, please see this article for performing the conversion on your local machine: <a href="https://www.phpbb.com/kb/article/offline-conversions/">Knowledge Base - Offline Conversions</a></p>
@@ -412,9 +412,9 @@
<p><strong>http 500 / white pages</strong> The conversion is a load-heavy procedure. Restrictions imposed by some server hosting providers can cause problems. The most common causes are: values too low for the PHP settings <code>memory_limit</code> and <code>max_execution_time</code>. Limits on the allowed CPU time are also a frequent cause for such errors, as are limits on the number of database queries allowed. If you cannot change such settings, then contact your hosting provider or run the conversion procedure on a different computer. The phpBB.com forums are also an excellent location to ask for support.</p>
- <p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB3, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the <em>I forgot my password</em> link on the login page.</p>
+ <p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB 3.x, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the <em>I forgot my password</em> link on the login page.</p>
- <p><strong>Path to your former board</strong> The convertor expects the relative path to your old board's files. So, for instance, if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
+ <p><strong>Path to your former board</strong> The convertor expects the relative path to your old board's files. So, for instance, if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB 3.x installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf
index bf7c4a43a8..d7f2fd782c 100644
--- a/phpBB/docs/sphinx.sample.conf
+++ b/phpBB/docs/sphinx.sample.conf
@@ -74,6 +74,7 @@ index index_phpbb_{SPHINX_ID}_main
charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF
min_prefix_len = 0
min_infix_len = 0
+ html_strip = 1
}
index index_phpbb_{SPHINX_ID}_delta : index_phpbb_{SPHINX_ID}_main
{
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 510d98ec11..e90c11f884 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -445,7 +445,7 @@ class p_master
break;
default:
- if (!preg_match('#(?:' . implode(array_keys($valid_tokens), ')|(?:') . ')#', $token))
+ if (!preg_match('#(?:' . implode(')|(?:', array_keys($valid_tokens)) . ')#', $token))
{
$token = '';
}
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 83ad56f3e4..77db5f3ed0 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -242,7 +242,7 @@ function mcp_topic_view($id, $mode, $action)
);
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_modify_post_data', compact($vars)));
- foreach ($rowset as $i => $row)
+ foreach ($rowset as $current_row_number => $row)
{
$message = $row['post_text'];
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
@@ -336,7 +336,7 @@ function mcp_topic_view($id, $mode, $action)
}
}
- unset($rowset[$i]);
+ unset($rowset[$current_row_number]);
}
// Display topic icons for split topic
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e1c28223dc..d6214c4614 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -46,6 +46,7 @@ class bbcode_firstpass extends bbcode
var $message = '';
var $warn_msg = array();
var $parsed_items = array();
+ var $mode;
/**
* Parse BBCode
@@ -1128,8 +1129,6 @@ class parse_message extends bbcode_firstpass
var $allow_quote_bbcode = true;
var $allow_url_bbcode = true;
- var $mode;
-
/**
* The plupload object used for dealing with attachments
* @var \phpbb\plupload\plupload
diff --git a/phpBB/phpbb/feed/controller/feed.php b/phpBB/phpbb/feed/controller/feed.php
index c0d7bc72ec..7826d19042 100644
--- a/phpBB/phpbb/feed/controller/feed.php
+++ b/phpBB/phpbb/feed/controller/feed.php
@@ -308,14 +308,13 @@ class feed
* Event to modify the feed row
*
* @event core.feed_modify_feed_row
- * @var int forum_id Forum ID
- * @var string mode Feeds mode (forums|topics|topics_new|topics_active|news)
+ * @var feed_interface feed Feed instance
* @var array row Array with feed data
- * @var int topic_id Topic ID
*
* @since 3.1.10-RC1
+ * @changed 3.3.0 Replace forum_id, mode, topic_id with feed instance
*/
- $vars = array('forum_id', 'mode', 'row', 'topic_id');
+ $vars = array('feed', 'row');
extract($this->phpbb_dispatcher->trigger_event('core.feed_modify_feed_row', compact($vars)));
// BBCode options to correctly disable urls, smilies, bbcode...
diff --git a/phpBB/phpbb/passwords/driver/argon2i.php b/phpBB/phpbb/passwords/driver/argon2i.php
index 49d7d6393e..bf4d6ec33a 100644
--- a/phpBB/phpbb/passwords/driver/argon2i.php
+++ b/phpBB/phpbb/passwords/driver/argon2i.php
@@ -37,10 +37,23 @@ class argon2i extends base_native
{
parent::__construct($config, $helper);
- // Don't allow cost factors to be below default settings
- $this->memory_cost = max($memory_cost, 1024);
- $this->threads = max($threads, 2);
- $this->time_cost = max($time_cost, 2);
+ // Workaround to prevent "Use of undefined constant" warning on some unsupported PHP installations
+ if (!defined('PASSWORD_ARGON2I'))
+ {
+ define('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 1024);
+ define('PASSWORD_ARGON2_DEFAULT_TIME_COST', 2);
+ define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);
+ }
+
+ /**
+ * For Sodium implementation of argon2 algorithm (since PHP 7.4), set special value of 1 for "threads" cost factor
+ * See https://wiki.php.net/rfc/sodium.argon.hash and PHPBB3-16266
+ * Don't allow cost factors to be below default settings where possible
+ */
+ $this->memory_cost = max($memory_cost, PASSWORD_ARGON2_DEFAULT_MEMORY_COST);
+ $this->time_cost = max($time_cost, PASSWORD_ARGON2_DEFAULT_TIME_COST);
+ $this->threads = (defined('PASSWORD_ARGON2_PROVIDER') && PASSWORD_ARGON2_PROVIDER == 'sodium') ?
+ PASSWORD_ARGON2_DEFAULT_THREADS : max($threads, PASSWORD_ARGON2_DEFAULT_THREADS);
}
/**
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 63ac242ea2..23460d3381 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -788,6 +788,8 @@ class fulltext_native extends \phpbb\search\base
$must_not_contain_ids = $this->must_not_contain_ids;
$must_contain_ids = $this->must_contain_ids;
+ $sql_sort_table = $sql_sort_join = $sql_match = $sql_match_where = $sql_sort = '';
+
/**
* Allow changing the query used for counting for posts using fulltext_native
*
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index f7dcd5d937..d2e12fd7c0 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -335,6 +335,7 @@ class fulltext_sphinx
array('charset_table', 'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'),
array('min_prefix_len', '0'),
array('min_infix_len', '0'),
+ array('html_strip', '1'),
),
'index index_phpbb_' . $this->id . '_delta : index_phpbb_' . $this->id . '_main' => array(
array('path', $this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_delta'),
diff --git a/phpBB/search.php b/phpBB/search.php
index bd8025dae5..5d5e9f5f8a 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1079,6 +1079,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$view_topic_url_params = "f=$forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+ $folder_img = $folder_alt = $u_mcp_queue = '';
+ $topic_type = $posts_unapproved = 0;
+ $unread_topic = $topic_unapproved = $topic_deleted = false;
+
if ($show_results == 'topics')
{
if ($config['load_db_track'] && $author_id === $user->data['user_id'])
@@ -1086,7 +1090,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$row['topic_posted'] = 1;
}
- $folder_img = $folder_alt = $topic_type = '';
topic_status($row, $replies, (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false, $folder_img, $folder_alt, $topic_type);
$unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;