From 0307d1f4aad7f3caca5146689c792584b5918c9a Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Tue, 2 Mar 2010 13:01:05 -0800 Subject: [PATCH 1/5] Oops, forgot the changelog for #57105 --- phpBB/docs/CHANGELOG.html | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 53863da302..3042027e83 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -98,6 +98,7 @@
  • [Fix] Allow redirect() function to redirect across directories. (Bug #56965)
  • [Fix] Add terminating semicolons to JavaScript code. (Bug #58085 - Patch by nn-)
  • [Fix] Minor language fixes. (Bug #54855)
  • +
  • [Fix] Parsing urls in signatures properly uses config settings. (Bug #57105)
  • [Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)
  • From 5cfa3544334907f7b5eac6b2cc5f38ab067db634 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 5 Mar 2010 20:34:28 +0100 Subject: [PATCH 2/5] [bug/12531] proposed solution for bug #12531 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_compress.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 3042027e83..4227ff08fb 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -99,6 +99,7 @@
  • [Fix] Add terminating semicolons to JavaScript code. (Bug #58085 - Patch by nn-)
  • [Fix] Minor language fixes. (Bug #54855)
  • [Fix] Parsing urls in signatures properly uses config settings. (Bug #57105)
  • +
  • [Fix] Prevent wrong tar archive type detection. (Bug #12531)
  • [Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)
  • diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index f17c780a65..f422eaa8c1 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -502,8 +502,8 @@ class compress_tar extends compress function compress_tar($mode, $file, $type = '') { $type = (!$type) ? $file : $type; - $this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false; - $this->isbz = (strpos($type, '.tar.bz2') !== false) ? true : false; + $this->isgz = preg_match('#(\.tar\.gz|\.tgz)$#', $type); + $this->isbz = preg_match('#\.tar\.bz2$#', $type); $this->mode = &$mode; $this->file = &$file; From 865123ffda92eeaba487f4e45342e1d8ef18fa6f Mon Sep 17 00:00:00 2001 From: David Ward Date: Sun, 7 Mar 2010 10:00:15 -0700 Subject: [PATCH 3/5] [bug/58755] Fix a redirection bug that can occur after login This issue affects any forum (i.e. https://myforum/phpBB3/) where: - the forum is located in a directory underneath the web root (i.e., NOT https://myforum/) - a user accesses the forum with a URI pointing to a directory rather than a script (i.e., NOT https://myforum/phpBB3/index.php) - the URI used ends in a slash (i.e., NOT https://myforum/phpBB3) If these conditions are met, after successful login the user is redirected to an invalid URI (i.e., https://myforum/phpBB3/phpBB3?sid=). This change fixes extract_current_page() to handle the case correctly where the URI ends in a slash and is not the web root. So after successful login, the redirection back to the main page will work (i.e., https://myforum/phpBB3/?sid=) --- phpBB/includes/session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 11f1896332..1a302d5991 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -83,7 +83,7 @@ class session $query_string = trim(implode('&', $use_args)); // basenamed page name (for example: index.php) - $page_name = basename($script_name); + $page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name); $page_name = urlencode(htmlspecialchars($page_name)); // current directory within the phpBB root (for example: adm) From c52a7e9a083d1bbd68f515bfdec2dbe1ebdef954 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 7 Mar 2010 21:54:56 +0100 Subject: [PATCH 4/5] Adding the bugfix for #58755 to the changelog. --- phpBB/docs/CHANGELOG.html | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index e54c4fd9bb..213e8fd9e0 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -101,6 +101,7 @@
  • [Fix] Minor language fixes. (Bug #54855)
  • [Fix] Parsing urls in signatures properly uses config settings. (Bug #57105)
  • [Fix] Allow multibyte keys in request_var(). (Bug #51555)
  • +
  • [Fix] Correct redirection after login to forum not in web root (Bug #58755)
  • [Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)
  • From d0d1ab54710f7a7f3426b2bcdfd63e9df24c046e Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 8 Mar 2010 00:41:42 +0100 Subject: [PATCH 5/5] Adding a branchname prepare-commit-msg hook Git supports several hooks, some of which are client-side. The prepare-commit-msg hook is run right after a `git commit` call, before the editor is opened. This allows the initial message to be altered. This hook will check if the current branch name begins with `bug/`, in which case it will prepend `[$branchname]` to the commit message. This makes it easier to create proper commit messages. http://wiki.phpbb.com/Git#Commit_Messages For more information refer to the hook source. --- git-tools/hooks/prepare-commit-msg | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 git-tools/hooks/prepare-commit-msg diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg new file mode 100755 index 0000000000..284354081e --- /dev/null +++ b/git-tools/hooks/prepare-commit-msg @@ -0,0 +1,24 @@ +#!/bin/sh +# +# A hook to add [$branch] to the beginning of a commit message +# if certain conditions are met. +# +# This is a prepare-commit-msg hook. +# +# To install this you can either copy or symlink it to +# $GIT_DIR/hooks, example: +# +# ln -s ../../git-tools/hooks/prepare-commit-msg \\ +# .git/hooks/prepare-commit-msg +# +# Make sure it is executable. + +# strip off ref: refs/heads/ +branch="$(cat $GIT_DIR/HEAD | sed 's/ref: refs\/heads\///g')" + +# * only run when normal commit is made (without -m or -F; +# not a merge, etc.) +# * also make sure the branch name begins with bug/ +if [ "$2" = "" ] && [ $(echo "$branch" | grep -e '^bug/') ]; then + echo "[$branch] $(cat $1)" > "$1" +fi