Bug 206990 - "My bugs" query doesn't work when the user name has a plus ('+') sign.
"My bugs" query doesn't work when the user name has a plus ('+') sign.
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
2.18
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Bernd Groh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-18 13:07 EDT by Håvard Wigtil
Modified: 2014-06-18 04:21 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-18 15:18:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 David Lawrence 2006-09-18 15:18:16 EDT
Problem is that the username is filtered in the template through the url_quote()
subroutine before being inserted in the URL. The code looks like this for
upstream Bugzilla's CVS tip:

sub url_decode {
    my ($todecode) = (@_);
    $todecode =~ tr/+/ /;       # pluses become spaces
    $todecode =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
    return $todecode;
}

So I find it difficult to believe that this problem does not also occur on
version 2.20+. Our version of url_quote() is different since we are using an
older version (2.18) and plus I think RH has made some of it's own changes.

# This orignally came from CGI.pm, by Lincoln D. Stein
sub url_quote {
    my ($toencode) = (@_);
    $toencode =~ s/([^a-zA-Z0-9_\-.%;&?\/\\:\+=~-])/uc sprintf("%%%02x",ord($1))/eg;
    return $toencode;
}

I am going to remove our exclusion of the + symbol and see what negative side
effects occur if any. It may have been put there for a reason some time ago but
I am not aware of why. Please reopn if this does not fix for you.

Dave
Comment 2 Håvard Wigtil 2006-09-19 03:19:47 EDT
Works for me now, thank you for the fix.

Note You need to log in before you can comment on or make changes to this bug.