aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml6
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_upload.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/acp/extensions.php2
-rw-r--r--phpBB/language/en/captcha_recaptcha.php2
-rw-r--r--phpBB/phpbb/passwords/manager.php2
-rw-r--r--phpBB/phpbb/plupload/plupload.php4
-rw-r--r--tests/plupload/plupload_test.php53
-rw-r--r--tests/upload/filespec_test.php2
-rwxr-xr-xtravis/setup-webserver.sh10
12 files changed, 69 insertions, 20 deletions
diff --git a/build/build.xml b/build/build.xml
index 8edee83d03..6c91827146 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.1.4" />
- <property name="prevversion" value="3.1.3" />
- <property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.4-RC1, 3.1.4-RC2" />
+ <property name="newversion" value="3.1.5-dev" />
+ <property name="prevversion" value="3.1.4" />
+ <property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 628e26b083..c53d976615 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.1.4');
+define('PHPBB_VERSION', '3.1.5-dev');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index cc5d185f4e..d460497669 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2389,7 +2389,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
}
// Redirect via an HTML form for PITA webservers
- if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
+ if (@preg_match('#WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
{
header('Refresh: 0; URL=' . $url);
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index f179b2fd70..89bc31fa25 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -213,6 +213,8 @@ class filespec
*/
static public function get_extension($filename)
{
+ $filename = utf8_basename($filename);
+
if (strpos($filename, '.') === false)
{
return '';
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index fbc26fde9a..b740977468 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -273,7 +273,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.4');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.5-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 28cdc8829d..bacb33c70a 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -75,7 +75,7 @@ $lang = array_merge($lang, array(
<li>Upload the new files</li>
<li>Enable the extension</li>
</ol>',
- 'EXTENSION_REMOVE_HEADLINE' => 'Completly removing an extension from your board',
+ 'EXTENSION_REMOVE_HEADLINE' => 'Completely removing an extension from your board',
'EXTENSION_REMOVE_EXPLAIN' => '<ol>
<li>Disable the extension</li>
<li>Delete the extension’s data</li>
diff --git a/phpBB/language/en/captcha_recaptcha.php b/phpBB/language/en/captcha_recaptcha.php
index 18438ab53e..df2ad4e51b 100644
--- a/phpBB/language/en/captcha_recaptcha.php
+++ b/phpBB/language/en/captcha_recaptcha.php
@@ -47,6 +47,6 @@ $lang = array_merge($lang, array(
'RECAPTCHA_PRIVATE' => 'Private reCaptcha key',
'RECAPTCHA_PRIVATE_EXPLAIN' => 'Your private reCaptcha key. Keys can be obtained on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.',
- 'RECAPTCHA_EXPLAIN' => 'In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.',
+ 'RECAPTCHA_EXPLAIN' => 'In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.',
'RECAPTCHA_SOCKET_ERROR' => 'There was a problem connecting to the RECAPTCHA service: could not open socket. Try again later.',
));
diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php
index fbb49d86a0..aa9147ecf4 100644
--- a/phpBB/phpbb/passwords/manager.php
+++ b/phpBB/phpbb/passwords/manager.php
@@ -56,7 +56,7 @@ class manager
* @param array $hashing_algorithms Hashing driver
* service collection
* @param \phpbb\passwords\helper $helper Passwords helper object
- * @param string $defaults List of default driver types
+ * @param array $defaults List of default driver types
*/
public function __construct(\phpbb\config\config $config, $hashing_algorithms, helper $helper, $defaults)
{
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index fcce5b3bd8..ca78167ec0 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -267,8 +267,8 @@ class plupload
{
$resize = sprintf(
'resize: {width: %d, height: %d, quality: 100},',
- (int) $this->config['img_max_height'],
- (int) $this->config['img_max_width']
+ (int) $this->config['img_max_width'],
+ (int) $this->config['img_max_height']
);
}
diff --git a/tests/plupload/plupload_test.php b/tests/plupload/plupload_test.php
new file mode 100644
index 0000000000..2f47bf2b39
--- /dev/null
+++ b/tests/plupload/plupload_test.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+class phpbb_plupload_test extends phpbb_test_case
+{
+ public function generate_resize_string_data()
+ {
+ return array(
+ array(
+ 0,
+ 0,
+ '',
+ ),
+ array(
+ 130,
+ 150,
+ 'resize: {width: 130, height: 150, quality: 100},'
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider generate_resize_string_data
+ */
+ public function test_generate_resize_string($config_width, $config_height, $expected)
+ {
+ $config = new \phpbb\config\config(array(
+ 'img_max_width' => $config_width,
+ 'img_max_height' => $config_height,
+ 'upload_path' => 'files',
+ ));
+ $plupload = new \phpbb\plupload\plupload(
+ '',
+ $config,
+ new phpbb_mock_request,
+ new \phpbb\user('\phpbb\datetime'),
+ new \phpbb\php\ini,
+ new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser))
+ );
+
+ $this->assertEquals($expected, $plupload->generate_resize_string());
+ }
+}
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index 05547dcd00..ed28bcb38f 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -213,6 +213,8 @@ class phpbb_filespec_test extends phpbb_test_case
array('file.phpbb.gif', 'gif'),
array('file..', ''),
array('.file..jpg.webp', 'webp'),
+ array('/test.com/file', ''),
+ array('/test.com/file.gif', 'gif'),
);
}
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
index ab045431cc..911ba12f3c 100755
--- a/travis/setup-webserver.sh
+++ b/travis/setup-webserver.sh
@@ -11,12 +11,6 @@
set -e
set -x
-if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
-then
- # Add PPA providing dependencies for recent HHVM on Ubuntu 12.04.
- sudo add-apt-repository -y ppa:mapnik/boost
-fi
-
sudo apt-get update
sudo apt-get install -y nginx realpath
@@ -30,11 +24,9 @@ APP_SOCK=$(realpath "$DIR")/php-app.sock
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
then
- # Upgrade to a recent stable version of HHVM
- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y hhvm-nightly
-
HHVM_LOG=$(realpath "$DIR")/hhvm.log
+ sudo service hhvm stop
sudo hhvm \
--mode daemon \
--user "$USER" \