]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 477459: buglist.cgi crashes for logged out users if the "Reporter" column is...
authorlpsolit%gmail.com <>
Fri, 20 Feb 2009 14:12:49 +0000 (14:12 +0000)
committerlpsolit%gmail.com <>
Fri, 20 Feb 2009 14:12:49 +0000 (14:12 +0000)
Bugzilla/DB.pm
Bugzilla/DB/Oracle.pm

index 81a720ee59eb04da7b538b0ef17965f1a10c84b9..f7d00f3b3852c1201bbb0518c53e90aef4aaeb14 100644 (file)
@@ -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
index ee150c024453db1724f7093bb7efeef854cc4ee7..83ece2a05b604f680cc65df5a83dcb2e7cbffb9c 100644 (file)
@@ -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) = @_;