Closed Bug 133793 Opened 22 years ago Closed 2 years ago

URL "@" in news URLs should not be escaped

Categories

(MailNews Core :: Networking: NNTP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: braden, Unassigned)

References

(Blocks 1 open bug, )

Details

RFC 1738 does not indicate that the "@" in a news URL should be escaped, but
Mozilla is doing this.
Can you put an example into the URL field?
A correct example or an incorrect example?
Anything that demonstrates your concerns by example.

I think you are saying that if something in the URL included "@", it should be
escaped, but isn't. We have lots of URL changes (mostly improvements), so
without an example, these get lost, never verified, etc...
Summary: "@" in news URLs should not be escaped → URL "@" in news URLs should not be escaped
To better articulate the problem: an escaped '@' in a news URL should not be
treated as a valid separator between the unique part and the server name in a
message id. Mozilla is in error in constructing a valid news URL out of the
incorrect example I gave. It is the existence of this bug that may have led to a
tendency to incorrectly escape the '@' within the Mozilla codebase.
... And it looks like the correct example above doesn't work in Mozilla, while
the incorrect one does.
see my comments on bug 130089 about this. It seems directly related to bug
133792,  because the url is parsed as a hierachical url that has to have a
hostname so the stuff after the scheme ends up as hostname which of course is
not allowed to have a @ in it, so it gets escaped.

or not: Just ran it through urltest:

urltest news:ae0r7j$h3d1@ripley.netscape.com

news,ae0r7j,,ripley.netscape.com,-1,/,,,,,,news://ae0r7j@ripley.netscape.com/

It does not escape the @.
There seems to some more mailnews magic involved here that gets the escaping
done, this does not come from the standard urlparser. It seems if a host without
username is detected the stuff gets escaped and moved to the path part, setting
a new host instead. If there is a username (indicated by the @) nothing happens
and the url fails.
Andreas: Yes, this is related to bug 133792. Since the various places news: has
been misused would probably blow up if this bug were fixed, I have listed bug
133792 as a blocker for this bug.

I am assuming that bug 133792 can be fixed by changing Mozilla's incorrect news:
URLs to nntp: URLs.
Depends on: 133792
-> mailnews
Component: Networking → Networking: News
Product: Browser → MailNews
Benjamin: I do not think this is a mailnews issue. It's a bug in the URI parser.
If news is using the hiearchical parser, it shouldn't. So mailnews needs to
write a news: parser. That is outside of necko, so I'm sending it to them.
Reassign.
Assignee: new-network-bugs → sspitzer
QA Contact: benc → stephend
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Blocks: 108948
Filter on "Nobody_NScomTLD_20080620"
QA Contact: stephend → networking.news
Product: Core → MailNews Core

Is this bug still relevant or can it be closed by now?

Flags: needinfo?(braden)

I don't know anywhere where Thunderbird is doing that.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(braden)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.