diff options
Diffstat (limited to 'contrib/BugzillaEmail.pm')
-rw-r--r-- | contrib/BugzillaEmail.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/BugzillaEmail.pm b/contrib/BugzillaEmail.pm index 473169c9e..db31d1f24 100644 --- a/contrib/BugzillaEmail.pm +++ b/contrib/BugzillaEmail.pm @@ -16,6 +16,7 @@ # Gregor Fischer <fischer@suse.de> # Klaas Freitag <freitag@suse.de> # Seth Landsman <seth@dworkin.net> +# Lance Larsh <lance.larsh@oracle.com> # The purpose of this module is to abstract out a bunch of the code # that is central to email interfaces to bugzilla and its database @@ -54,8 +55,8 @@ sub findUser($) { return $found_address; } elsif ($email_transform eq $EMAIL_TRANSFORM_BASE_DOMAIN) { my ($username) = ($address =~ /(.+)@/); - my $stmt = "SELECT login_name FROM profiles WHERE " . $dbh->sql_istrcmp( - 'login_name', $dbh->quote($username), $dbh->sql_regexp()); + my $stmt = "SELECT login_name FROM profiles WHERE " . $dbh->sql_regexp( + $dbh->sql_istring('login_name'), $dbh->sql_istring($dbh->quote($username))); SendSQL($stmt); my $domain; @@ -72,8 +73,8 @@ sub findUser($) { return $new_address; } elsif ($email_transform eq $EMAIL_TRANSFORM_NAME_ONLY) { my ($username) = ($address =~ /(.+)@/); - my $stmt = "SELECT login_name FROM profiles WHERE " .$dbh->sql_istrcmp( - 'login_name', $dbh->quote($username), $dbh->sql_regexp()); + my $stmt = "SELECT login_name FROM profiles WHERE " .$dbh->sql_regexp( + $dbh->sql_istring('login_name'), $dbh->sql_istring($dbh->quote($username))); SendSQL($stmt); my $found_address = FetchOneColumn(); return $found_address; |