All my settings have changed and all cookie exceptions are deleted
I typically run with cookies disabled (do not allow web sites to store cookies). I then manually allow selected sites to do so.
I recently tried to add a site to the exception list only to discover that many of my settings have been changed and all of my exceptions have been deleted.
I did not do this intentionally. The only thing I can think of is I allowed FF to upgrade to 36.0. I think this was a few weeks ago.
How can I get the cookie exception list back? There were at least 100, maybe a lot more. I have no way of knowing which ones they all were.
How can I prevent this from happening again?
Modified
Chosen solution
It seems to be working.
Read this answer in context 👍 0All Replies (12)
These are stored in the permissions.sqlite file.
Do you have a back up of your profile from before the update?
Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
guigs2 said
These are stored in the permissions.sqlite file. Do you have a back up of your profile from before the update?
A search for "permissions.sqlite" revealed 2 copies.
One, a 64 KB file with a time stamp of 3/10/15, is in this folder.
C:\Documents and Settings\Administrator\Application Data\Mozilla\Firefox\Profiles\et07upwc.default-1425326879500
Carbonite shows 3 backups for that file, all 64 KB, dated 3/04, 3/05, and 3/07.
The other, a 128 KB file with a time stamp of 3/02/15, is in this folder, which has the same time stamp.
C:\Documents and Settings\Administrator\Desktop\Old Firefox Data\r75xmc9e.default
I do not recall creating that folder. Could it have been created by the FF update? I thought the date was earlier, but it could have been 3/02.
It looks like the 3/02 file might have the cookie exceptions as it;s the largest file. Now how do I restore them and any that might have been added since then?
cor-el said
Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
I don' t think I ever did that as I don't know what it means. At least I didn't do it on purpose.
Is it possible that the 36.0 update cleared all cookie exceptions? If so, how can I prevent that from happening again?
Aha, the Old Firefox Data folder is created if you use the Refresh feature. If Firefox detects that it is performing sluggishly, it may suggest using the feature. Does that sound familiar at all?
The permissions.sqlite database can be copied from the old profile folder to the current one to replace the current one (Firefox should be closed when doing this). However, I do not know of a way to merge them, so any unique new permissions (not also present in the old file) would be lost in the process.
If you want to export a list of the permissions for reference, I think you could do that using the SQLite Manager extension, but it might be more trouble than it's worth to try to compare the results you get.
Another option would be to roll back 8 days (copy/pasted from another thread):
As you know, Reset/Refresh copies your settings (profile) folder to the desktop into a folder named "Old Firefox Data". Check inside "Old Firefox Data" folder for a folder with a semi-randomized name. If there's only one, that probably has your old settings and add-ons. If there's more than one, you'll want to work with the one that was updated most recently.
Once you have identified the profile folder you want to restore, here is my suggested "old profile resurrection procedure":
Overview
These are the steps:
- Create a new Firefox profile
- Remove everything from that new profile folder
- Copy in everything from the old profile folder
Create a new Firefox profile (Windows)
Exit Firefox and start up in the Profile Manager by pasting the following into the Start > Run dialog and pressing Enter:
firefox.exe -P
Note: Any time you want to switch profiles, exit Firefox and return to this dialog.
Click the Create Profile button, assign a name like OldSettings, and skip the option to change the folder location. Then select that new profile in the dialog and start Firefox.
Open the New Profile folder in Windows Explorer
Firefox in the new profile should look like a factory fresh installation. Open the Troubleshooting Information page using either:
- "3-bar" menu button > "?" button > Troubleshooting Information
- Help menu > Troubleshooting Information
- type or paste about:support in the address bar and press Enter
In the first table, click the "Show Folder" button. Firefox will launch your brand new profile folder in Windows Explorer.
Leaving that folder open, switch back to Firefox, and Exit. When Firefox closes, the profile folder should be front and center, or you can activate it using the Task bar.
Copy Old Data in Place of New
In that new profile folder, select all the contents and delete.
Leaving that window open, open or switch over to your Old Firefox Data folder. Drill down into your old profile folder. At this level you should see a folder named bookmarkbackups among other things.
Select everything (Ctrl+a) and Copy (either right-click > Copy or Ctrl+c).
Switch to the empty new profile folder in other window and Paste (either right-click > Paste or Ctrl+v). This may take a minute since some of the files are large.
Start Firefox
Firefox should start up in that new profile with the resurrected old profile data. Success?
At this point, you can pick up where you left off, or just use it for reference in rebuilding your settings in your newer profile.
jscher2000 said
Aha, the Old Firefox Data folder is created if you use the Refresh feature. If Firefox detects that it is performing sluggishly, it may suggest using the feature. Does that sound familiar at all?
Yes, I do think I got a message that FireFox was running slowly, but I don't recall what I did, if anything. I may have clicked on an OK button to allow a refresh. I'll be more careful in the future.
The permissions.sqlite database can be copied from the old profile folder to the current one to replace the current one (Firefox should be closed when doing this). However, I do not know of a way to merge them, so any unique new permissions (not also present in the old file) would be lost in the process. If you want to export a list of the permissions for reference, I think you could do that using the SQLite Manager extension, but it might be more trouble than it's worth to try to compare the results you get.
This is really bad. There is no way to merge the files and there's no way to even display them. FF should have a way to export the list of exceptions. Then I could sort them and do a compare in Word.
And the chances of me doing that complicated reconstruction process without screwing it up are nil.
Modified
There is a way to extract the blocked cookie sites using the SQLite Manager extension. You can open permissions.sqlite, use the Execute SQL to select the blocked cookies and then export the list to a CSV file. (You can extract other permissions, too, but I think these are the ones you are really focused on.)
Extension: https://addons.mozilla.org/firefox/addon/sqlite-manager/
You can use the Tools menu (tap the Alt key to display the classic menu bar if needed) to start up SQLite Manager.
To extract the current list: On the toolbar, click the (Select Profile Database) button on the toolbar and choose permissions.sqlite.
To extract the old list: On the File menu > Connect Database, then navigate to and select the old permissions.sqlite file.
In the left column, expand Tables and select moz_host.
On the right side, click Execute SQL and paste this query:
SELECT host, type, permission FROM moz_hosts WHERE type='cookie' AND permission=2
Then click Run SQL to generate the results and use Actions > Save results to export the results to file. Note that the CSV file has Unix line breaks, so it all runs together in Notepad. Better to view it in a more sophisticated editor.
I think I figured out how to restore the cookie settings (exceptions).
- Start FF and check the list of exceptions. There were only two. One of them was wordbanter.com.
- Close FF.
- Rename the copy of permissions.sqlite in the FF profile folder.
- Copy the copy of permissions.sqlite from the \Old FireFox Data folder to the FF profile folder.
- Restart FF. It looks like all of the exceptions are there.
- Enter the two that were in the old copy of permissions.sqlite.
Any problems with this?
That should be OK if the file from the "Old Firefox Data" folder is working.
Chosen Solution
It seems to be working.
There's now a better solution available that doesn't involve messing with SQLite. The Cookie Wizard with Whitelist extension will export or import the cookie exceptions list to a text file. It can be imported on any other system with this extension installed. The text file is readable, and so could also be used to manually recover deleted entries. It would be a quick and easy thing to export a backup copy of this list whenever it occasionally is updated.
See https://addons.mozilla.org/addon/cookie-wizard-with-whitelist/