Bug 206990 - "My bugs" query doesn't work when the user name has a plus ('+') sign.
Summary: "My bugs" query doesn't work when the user name has a plus ('+') sign.
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 2.18
Hardware: All
OS: Linux
medium
medium vote
Target Milestone: ---
Assignee: Bernd Groh
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-18 17:07 UTC by Håvard Wigtil
Modified: 2014-06-18 08:21 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2006-09-18 19:18:16 UTC


Attachments (Terms of Use)

Comment 1 David Lawrence 2006-09-18 19:18:16 UTC
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 07:19:47 UTC
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.