login form redirects me to




13 years ago
7 years ago


(Reporter: LpSolit, Assigned: darin.moz)



Firefox Tracking Flags

(Not tracked)




(2 attachments)



13 years ago
This URL contains a double slash // and the login form on Bugzilla redirects me outside, in my case (but I suspect it depends on your locale, in my case: french).

Discussing with CTho on #developers, it looks like the login and password have been sent to instead of, meaning that they have now my admin login and password for our QA installations.

I'm using Fx 20060111.
Reproduced on XP trunk SeaMonkey, updating OS/Version.

"paul" doesn't resolve to anything for me though, so data I enter goes nowhere and I just get an error page.
OS: Linux → All
Version: 1.8 Branch → Trunk

Comment 2

13 years ago
Created attachment 209980 [details]
http log

gavin asked me to attach my http log while reproducing the problem.
As far as I can tell, this isn't a bug. You are ending up at because that's what "paul" ends up being, after being passed through the keyword protocol handler (you should get the same result typing just "paul" in the address bar). None of the submitted data is actually being forwarded to the keyword result, as far as I can tell. You can test this by setting keyword.url to something like "", which just echoes passed in data, and following the same steps to reproduce.

Without the data being passed, this bug is essentially just "you get redirected unexpectedly", and there are existing bugs on not redirecting to keyword.url for things not explicitly typed in the URL bar (bug 310826?).

Comment 4

13 years ago
OK, so feel free to INVALIDate this bug.
Created attachment 209985 [details]
a testcase

This testcase doesn't involve keywords, and does send gavin your password.
Is this a landfill bug in the way it handles multiple installations? The form action is derived from the URL. If you don't specify the double-slash and visit the intended then the form action is "/paul/index.cgi" which logs into landfill. If you use the double-slash it's copied into the form action making 'paul' a hostname. Landfill should do some sanity-checking when generating the form action, or specify the complete url.

Why is this filed as a networking bug? It looks like Gecko is doing exactly what the page is telling it to do (submit the form to "paul").
(In reply to comment #6)
> Why is this filed as a networking bug? It looks like Gecko is doing exactly
> what the page is telling it to do (submit the form to "paul").

I think the question is, is treating // as http:// instead of / a good decision from a security perspective?  Presumably bugzilla isn't the only software in the world that fails to strip double-slashes.

Comment 8

13 years ago
The problem is not specific to landfill, it affects *all* Bugzilla installations.

The problem is that template/en/default/account/auth/login-small.html.tmpl uses:

<form name="login" action="[% cgi.script_name FILTER html %]" method="POST">

so when you enter //foo, you get action="//foo/index.cgi" which redirects you outside your Bugzilla installation with your login and password.

It could as well be a bug in itself. Anyway, Bugzilla should probably use Param('urlbase').

Comment 9

13 years ago
Either comment 7 is a WONTFIX and I move this bug in the Bugzilla product or I open a new bug for Bugzilla. dveditz?


13 years ago
Summary: redirects me to (or anywhere else outside → login form redirects me to

Comment 10

13 years ago
bug 325079 has been opened to fix the bug in Bugzilla (affects versions >= 2.20).
(In reply to comment #7)
> I think the question is, is treating // as http:// instead of / a good decision
> from a security perspective?

It's in the spec (rfc 2396 section 5): "A relative reference beginning with two slash characters is termed a network-path reference, as defined by <net_path> in Section 3.  Such references are rarely used."

We can decide they're bad news but we'll be breaking some unknown number of sites. IE does the same so "fixing" Gecko doesn't solve the bugzilla problem.
So given the that this is correct per the spec, and that exploiting it requires that the server uses the "script name" as a form action attribute in addition to having a URL-like path to the script, I think this is INVALID.
Hardware: PC → All

*** This bug has been marked as a duplicate of 325079 ***
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
This bug this is a duplicate of has now had a security advisory issued. (issue #3)

Removing the security flag.
Group: security
You need to log in before you can comment on or make changes to this bug.