Search.pm: Full usernames do not appear in whine mails because of the Bugzilla->user->id check in COLUMNS

RESOLVED DUPLICATE of bug 550299

Status

()

Bugzilla
Whining
RESOLVED DUPLICATE of bug 550299
8 years ago
7 years ago

People

(Reporter: gerv, Unassigned)

Tracking

Details

Search.pm truncates email addresses if it can't find a current user:
        if (!Bugzilla->user->id) {
             $sql = $dbh->sql_string_until($sql, $dbh->quote('@'));
        }

However, whine.pl passes in the user to use as a parameter to Search.pm's new() method rather than setting Bugzilla->user. Search.pm stores the passed-in value (in the init() method): 
    $self->{'user'} ||= Bugzilla->user;
    my $user = $self->{'user'};

but doesn't use it in the above check.

In fact, it's a bit tricky for Search.pm to do so, because the method is a static method (COLUMNS) and so doesn't have access to class variables.

This bug is in 3.4.2 and also, as far as I can see, in current trunk.

Gerv

Comment 1

8 years ago
Yeah, I wrote an XXX comment about it above the code on trunk. We need to do some of that stuff inside of a method on the Search object instead of in the constant.
Summary: Full usernames do not appear in whine mails → Search.pm: Full usernames do not appear in whine mails because of the Bugzilla->user->id check in COLUMNS

Updated

7 years ago
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 550299
You need to log in before you can comment on or make changes to this bug.