Closed
Bug 470439
Opened 16 years ago
Closed 16 years ago
Migration from signons.txt loses newsgroup username/password information.
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Keywords: fixed1.9.1, Whiteboard: [tb3needs])
Attachments
(1 file, 1 obsolete file)
9.72 KB,
patch
|
Dolske
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Due to the way that MailNews stores newsgroup logins in signons.txt, we need to keep the path information.
Currently mailnews stores:
news://localhost/#password
news://localhost/#username
Although these aren't ideal, until we do a further uplift in mailnews to fix what we do, I'm not going to change them. In any case - when we upgrade, they currently come out as:
news://localhost/
hence we don't have enough info.
I have a patch for this, just need to extend the unit tests.
Assignee | ||
Updated•16 years ago
|
Whiteboard: [tb3needs]
Comment 1•16 years ago
|
||
(In reply to comment #0)
> Currently mailnews stores:
>
> news://localhost/#password
> news://localhost/#username
Does this mean 2 logins? Is that literally "#username" or is it actual logins data (eg "#dolske")? Is localhost just an example hostname here?
Assignee | ||
Comment 2•16 years ago
|
||
(In reply to comment #1)
> (In reply to comment #0)
>
> > Currently mailnews stores:
> >
> > news://localhost/#password
> > news://localhost/#username
>
> Does this mean 2 logins? Is that literally "#username" or is it actual logins
> data (eg "#dolske")? Is localhost just an example hostname here?
localhost is just an example hostname. It is literally just "#username" and "#password". MailNews currently stores them like this because newsgroup servers don't have to have a username and password, the protocol allows for just a username.
Assignee | ||
Comment 3•16 years ago
|
||
This is the proposed fix, I need to write some more unit tests first.
Comment 4•16 years ago
|
||
Looks ok.
Assignee | ||
Comment 5•16 years ago
|
||
Here's the fix with unit tests. I've checked these and the rest of the password manager tests work on Firefox and Thunderbird.
Attachment #353888 -
Attachment is obsolete: true
Attachment #354212 -
Flags: review?(dolske)
Comment 6•16 years ago
|
||
Comment on attachment 354212 [details] [diff] [review]
The fix
>+// News is set up as an external protocol in Firefox's prefs, for this test
>+// to work, we need it to be internal.
>+var prefBranch = Cc["@mozilla.org/preferences-service;1"].
>+ getService(Ci.nsIPrefBranch);
>+prefBranch.setBoolPref("network.protocol-handler.external.news", false);
What happens if this pref isn't flipped (and/or if NewsProtocolFactory isn't registered)?
Seems like a Firefox bug if it can't understand standard URI types, and possibly a login manager bug depending on what happens.
>@@ -107,7 +122,13 @@ dummyuser3.init("mailbox://localhost", n
> dummyuser3.init("mailbox://localhost", null, "mailbox://localhost",
> "test+pop3", "pop3test", "", "");
>
>-dummyuser4.init("http://dummyhost.mozilla.org", "", null,
>+dummyuser4.init("news://localhost", null, "news://localhost/#password",
>+ "", "newstest", "", "");
>+
>+dummyuser5.init("news://localhost", null, "news://localhost/#username",
>+ "", "testnews", "", "");
>+
>+dummyuserlast.init("http://dummyhost.mozilla.org", "", null,
> "testuser1", "testpass1", "put_user_here", "put_pw_here");
Why "dummyuserlast"? There's no ordering guaranteed in the pwmgr results. Just add new dummyuser5 and dummyuser6 entries unless there's some reason for this.
Attachment #354212 -
Flags: review?(dolske) → review+
Assignee | ||
Comment 7•16 years ago
|
||
(In reply to comment #6)
> (From update of attachment 354212 [details] [diff] [review])
> >+// News is set up as an external protocol in Firefox's prefs, for this test
> >+// to work, we need it to be internal.
> >+var prefBranch = Cc["@mozilla.org/preferences-service;1"].
> >+ getService(Ci.nsIPrefBranch);
> >+prefBranch.setBoolPref("network.protocol-handler.external.news", false);
>
> What happens if this pref isn't flipped (and/or if NewsProtocolFactory isn't
> registered)?
If this pref isn't flipped, then Firefox builds will revert to trying to use the external URI handler for the protocol, which reverts it to using nsSimpleURI (which is the same in the non *ProtocolFactory cases). nsSimpleURI can't parse URIs, nsStandardURL can, hence for Firefox we define the protocol factories to
> Seems like a Firefox bug if it can't understand standard URI types, and
> possibly a login manager bug depending on what happens.
Well it can understand standard URI types, it just can't parse them (or do things like get default port).
Assignee | ||
Updated•16 years ago
|
Summary: Migration from signons.txt looses newsgroup username/password information. → Migration from signons.txt loses newsgroup username/password information.
Assignee | ||
Comment 8•16 years ago
|
||
Patch checked in: http://hg.mozilla.org/mozilla-central/rev/30d34ca12778
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•16 years ago
|
||
Comment on attachment 354212 [details] [diff] [review]
The fix
Requesting 1.9.1 approval for this minor fix to importing/upgrading password files containing "news" protocol. This is needed for Thunderbird and SeaMonkey migration to toolkit password manager.
Should be low risk to Firefox as FF doesn't use news protocols, and this is in a migration path that has a reasonable number of unit tests as well.
Attachment #354212 -
Flags: approval1.9.1?
Comment 10•16 years ago
|
||
Comment on attachment 354212 [details] [diff] [review]
The fix
a191=beltzner
Attachment #354212 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Comment 11•16 years ago
|
||
Checked into 1.9.1 branch:
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/0da822e765f3
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•