aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--phpBB/adm/images/phpbb_logo.pngbin9313 -> 6662 bytes
-rwxr-xr-xphpBB/develop/strip_icc_profiles.sh26
-rwxr-xr-xtravis/check-image-icc-profiles.sh15
-rwxr-xr-xtravis/setup-exiftool.sh9
-rwxr-xr-xtravis/setup-phpbb.sh5
6 files changed, 56 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 0ac1464540..e608a3f514 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,7 @@ before_script:
script:
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
+ - travis/check-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
diff --git a/phpBB/adm/images/phpbb_logo.png b/phpBB/adm/images/phpbb_logo.png
index c3f9248ed7..2d76ef18cb 100644
--- a/phpBB/adm/images/phpbb_logo.png
+++ b/phpBB/adm/images/phpbb_logo.png
Binary files differ
diff --git a/phpBB/develop/strip_icc_profiles.sh b/phpBB/develop/strip_icc_profiles.sh
new file mode 100755
index 0000000000..69431fbac2
--- /dev/null
+++ b/phpBB/develop/strip_icc_profiles.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+
+if [ "$#" -ne 1 ]; then
+ SCRIPT=$(basename "$0")
+ echo "Description: Finds and strips ICC Profiles from given image file." >&2
+ echo "Usage: $SCRIPT /path/to/image/file" >&2
+ echo "Exit Status: 0 if no ICC profiles have been stripped, otherwise 1." >&2
+ echo "Requires: exiftool" >&2
+ exit 1
+fi
+
+FILE=$1
+HASH_OLD=$(md5sum "$FILE")
+exiftool -icc_profile"-<=" -overwrite_original_in_place "$FILE" > /dev/null 2>&1
+HASH_NEW=$(md5sum "$FILE")
+
+if [ "$HASH_OLD" != "$HASH_NEW" ]
+then
+ echo "Stripped ICC Profile from $FILE."
+ exit 1
+fi
diff --git a/travis/check-image-icc-profiles.sh b/travis/check-image-icc-profiles.sh
new file mode 100755
index 0000000000..fa9300012a
--- /dev/null
+++ b/travis/check-image-icc-profiles.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
+then
+ find . -type f -not -path './phpBB/vendor/*' -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' | \
+ parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}'
+fi
diff --git a/travis/setup-exiftool.sh b/travis/setup-exiftool.sh
new file mode 100755
index 0000000000..55bcda6c9f
--- /dev/null
+++ b/travis/setup-exiftool.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+
+sudo apt-get update
+sudo apt-get install -y parallel libimage-exiftool-perl
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
index f079a0a6b7..fe57d2f238 100755
--- a/travis/setup-phpbb.sh
+++ b/travis/setup-phpbb.sh
@@ -9,6 +9,11 @@ set -x
DB=$1
TRAVIS_PHP_VERSION=$2
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
+then
+ travis/setup-exiftool.sh
+fi
+
if [ "$DB" == "mariadb" ]
then
travis/setup-mariadb.sh