From: lpsolit%gmail.com <> Date: Fri, 20 Feb 2009 14:12:49 +0000 (+0000) Subject: Bug 477459: buglist.cgi crashes for logged out users if the "Reporter" column is... X-Git-Tag: bugzilla-3.3.4~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4192ccfd0318d1772df6ff58ad06966ddd0c5449;p=thirdparty%2Fbugzilla.git Bug 477459: buglist.cgi crashes for logged out users if the "Reporter" column is displayed - Patches by Frédéric Buclin and Xiaoou r/a=mkanat --- diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 81a720ee59..f7d00f3b38 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -52,7 +52,7 @@ use Storable qw(dclone); use constant BLOB_TYPE => DBI::SQL_BLOB; use constant ISOLATION_LEVEL => 'REPEATABLE READ'; -use constant GROUPBY_REGEXP => '(?:.*\s+AS\s+)?(\w+(\.\w+)?)(?:\s+(ASC|DESC))?$'; +use constant GROUPBY_REGEXP => '(?:.*\s+AS\s+|SUBSTRING\()?(\w+(\.\w+)?)(?:\s+(ASC|DESC|FROM\s+.+))?$'; # Set default values for what used to be the enum types. These values # are no longer stored in localconfig. If we are upgrading from a diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index ee150c0244..83ece2a05b 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -52,7 +52,7 @@ use base qw(Bugzilla::DB); use constant EMPTY_STRING => '__BZ_EMPTY_STR__'; use constant ISOLATION_LEVEL => 'READ COMMITTED'; use constant BLOB_TYPE => { ora_type => ORA_BLOB }; -use constant GROUPBY_REGEXP => '((CASE\s+WHEN.+END)|(TO_CHAR\(.+\))|(\(SCORE.+\))|(\(MATCH.+\))|(\w+(\.\w+)?))(\s+AS\s+)?(.*)?$'; +use constant GROUPBY_REGEXP => '((CASE\s+WHEN.+END)|(SUBSTR.+\))|(TO_CHAR\(.+\))|(\(SCORE.+\))|(\(MATCH.+\))|(\w+(\.\w+)?))(\s+AS\s+)?(.*)?$'; sub new { my ($class, $user, $pass, $host, $dbname, $port) = @_;