Closed Bug 485395 Opened 16 years ago Closed 16 years ago

Never prompted for password, so auth always fails

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: rjt, Assigned: standard8)

References

Details

(Keywords: regression, Whiteboard: [m5][has reviewed patch])

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-gb) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090326 Shredder/3.0b3pre Attempting to connect to an IMAP server, Shredder tries 4 times to connect - the status bar says "sending login information" - and each time pops-up "Login to server xxxx failed". Error console shows the following: Error: malformed URI sequence Source file: file:///Applications/Shredder.app/Contents/MacOS/components/nsLoginManagerPrompter.js Line: 357 Note that my username contains a percentage symbol, e.g. me%pop3.example.com Reproducible: Always Steps to Reproduce: 1. Configure an IMAP account 2. Click on 'Inbox' or otherwise prompt TB to try to connect to the server I'm marking as critical because, although it doesn't crash, the app is quite useless unless it can connect to the IMAP server.
Forgot to say in the description - I'm never prompted for a password, so it's not surprising that auth fails.
Please attach (!) an Imap log: https://wiki.mozilla.org/MailNews:Logging crash is only used for dataloss or crash, marking major for major loss of function.
Severity: critical → major
Attached file IMAP log
Thanks for the info. about Importance. I couldn't decide between Critical or Major, so thought I'd err on the side of caution. I don't know my way around the source tree, but the JS is quite accessible, so I could do some digging there. It seems that the username in the NSIURI returned from this._ioService.newURI() is 'rjt%pop3%2Ezygous%2Eco%2Euk', when (I guess) it should be 'rjt%25pop3%2Ezygous%2Eco%2Euk'. The aRealmString passed-in looks fine though - 'imap://rjt%pop3.zygous.co.uk@pop3.gradwell.net'. Not having a dev environment set-up, and not knowing my way around, I can't find the function definition for this._ioService.newURI(), so I've hit a dead-end.
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
This is probably fallout from the recent password manager changes. Richard did this work in versions of Thunderbird before 3.0b2, i.e. 3 beta 1 or 2.0.0.x?
Assignee: nobody → bugzilla
Flags: blocking-thunderbird3+
Keywords: regression
Target Milestone: --- → Thunderbird 3.0b3
I'm afraid I've not tried 3.0b1, but it works find in TB2, yes.
Richard, do you normally store your password within TB? If so, in your TB 2, can you go into Preferences, then under Privacy you'll find a passwords tab. Click on Saved Passwords (or the equivalent button), and then look for the imap entry for your account, I'd like to know what it is saved as, e.g. rjt%25pop3%2Ezygous%2Eco%2Euk.
Whiteboard: [m5]
Site: imap://rjt%40pop3.zygous.co.uk@pop3.gradwell.net Username: rjt%40pop3%2Ezygous%2Eco%2Euk
I've just realised that the '%40' codes above decode to '@' symbols, which is clearly different from the '%25' ('%') I've entered above. However, in this case the IMAP server isn't too fussy - either will do - and Shredder doesn't like the '@' any more than it likes the '%' at the moment. It's not just that I've entered my username wrongly!
i am _not_ using password manager at all, TB3b3pre just never asks me for the password, so i would not even get the chance of saving the password. in the IMAP server´s logfile i see that a base64-encoded authentication string is sent to the server with the username and an empty password.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
doesn't look so good, but maybe there's some other unlrelated problem in this build... "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
(In reply to comment #13) > doesn't look so good, but maybe there's some other unlrelated problem in this > build... > > "This application has failed to start because the application configuration is > incorrect. Reinstalling the application may fix this problem." That's strange, I've just tried this on my Windows XP Virtual Machine and it seems to work fine. Could you perhaps try this version instead: http://s3.mozillamessaging.com.s3.amazonaws.com/build/try-server/2009-04-08_02:11-bugzilla@standard8.plus.com-st8-password1/bugzilla@standard8.plus.com-st8-password1-mail-try-win32.zip Its a zip build rather than an installer.
I've just had a chance to test the Mac version link(In reply to comment #12) > I've got a WIP patch that should fix the problem (I'll post it in a while). > > Erik, Richard could you test one of these builds and see if this resolves your > problem, if so it will give me more confidence in the fix: Perfect! This works for me now - TB prompts for a password when trying to receive and when trying to send mail (my SMTP server requires auth), and I could send and receive a test message successfully.
Attached patch The fix (obsolete) — Splinter Review
Here's the fix. What happened was that when I did the switch to login manager, the manager unescapes the URI & hostname that was previously stored escaped in wallet. Then when I did the nsMsgIncomingServer changes, I forgot that when we pass the URL to PromptPassword, it will also unescape the URL. So GetPasswordWithUI needs to escape the username because it is putting it into a URL. I believe it doesn't need to escape the hostname, because we're not allowed any characters that need escaping. GetPasswordWithoutUI can stay as it is as it is dealing with login manager storage, which is already unescaped. Hopefully that makes some sense. Requesting review from Neil and David on this small patch just to doubly make sure I've got it right.
Attachment #372589 - Flags: superreview?(bienvenu)
Attachment #372589 - Flags: review?(neil)
Whiteboard: [m5] → [m5][has patch][needs review Neil,bienvenu]
Comment on attachment 372589 [details] [diff] [review] The fix Looks reasonable to me. >+ serverUri.AppendLiteral("@"); Nit: could change this to .Append('@')
Attachment #372589 - Flags: review?(neil) → review+
Attached patch The fix v2Splinter Review
Addressed Neil's comment.
Attachment #372589 - Attachment is obsolete: true
Attachment #373291 - Flags: superreview?(bienvenu)
Attachment #373291 - Flags: review+
Attachment #372589 - Flags: superreview?(bienvenu)
Attachment #373291 - Flags: superreview?(bienvenu) → superreview+
Whiteboard: [m5][has patch][needs review Neil,bienvenu] → [m5][has reviewed patch]
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Version: unspecified → Trunk
(In reply to comment #13) > doesn't look so good, but maybe there's some other unlrelated problem in this > build... > > "This application has failed to start because the application configuration is > incorrect. Reinstalling the application may fix this problem." just fyi: This is probably a problem due to the installer not having the msvc*80.dll files packaged.
Yeah, that was bug 487751, which I thought about depending, but in the end seem not to have even commented about.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: