Closed Bug 661481 Opened 14 years ago Closed 14 years ago

Cannot save session because of SessionStore error

Categories

(Firefox :: Session Restore, defect)

x86_64
All
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 668646

People

(Reporter: rebel, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Build Identifier: Using Firefox 4.0.1 and Session Manager 0.7.5, when I am trying to save a session in the Session Manager I am getting the following error message: This operation failed due to a file access error: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsICookieManager2.getCookiesFromHost] Session-20110601.session JS frame :: file:///usr/lib64/firefox/components/nsSessionStore.js :: <TOP_LEVEL> :: line 2140 According to the Session Manager developers this is a bug in CookieManager, a SessionStore component: https://www.mozdev.org/bugs/show_bug.cgi?id=24061 Reproducible: Always
Component: Networking: Cookies → Session Restore
Product: Core → Firefox
QA Contact: networking.cookies → session.restore
Cookie service does use NS_ERROR_INVALID_ARG (which is the same as NS_ERROR_ILLEGAL_VALUE) all over the place... The session restore code needs to catch here.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Someone else reported this problem to me after they upgraded from Firefox 3.6 to 6.0. He's running Windows 7. Looking at the sessionstore code I don't see why this should fail since all the argument must pass the /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/ regular expression else they aren't added to interator that the arguments come from. See line 2108 in nsSessionStore.js From what I've been able to tell in order for the getCookiesFromHost function to throw an NS_ERROR_ILLEGAL_VALUE, it needs to be passed something it doesn't like. After throwing all kinds of boolean, integers and strings at it, the only thing I've found it not to like that matches the above regular expression is a something with multiple periods in a row such as "http://www.google..com". Obviously though that's not a valid URL. I can actually reproduce the problem very easily by trying to go to "http://www.google..com" in the address bar. The page won't load, but after I do that, the error console will start filling up with the exception from comment #0. This continues even if I go to another valid URL and the page loads. It continues to happen until I close the tab. So it's possible someone might type in a wrong URL and then correct it and things would be broken until that tab was closed. There also might be some other URL that matches the regular expression above, but causes the cookie service to throw. I agree though, the easiest fix is to put a try catch around the call. Though that probably wasn't done for performance reasons.
OS: Linux → All
Bah, I missed that this bug existed before I filed bug 668646. Thanks for following up and investigating though.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.