Regarding this question, I was setting some cookies on a PythonFlask app which is accessed directly via http://127.0.0.1:8000, and I realized that it seems that, after accessing the address above, no such information regarding the SITE was stored in cookies.sqlite.
For example:
OK
$ sqlite3 cookies.sqlite "select * from moz_cookies where baseDomain glob '*stackoverflow*'"
357167|stackoverflow.com||cc|0d41064c61774c12b5d369694f729429|stackoverflow.com|/|1784567753|1469906956225907|1469034954014292|0|0|0|0
366821|stackoverflow.com||_gat|1|.stackoverflow.com|/|1469907557|1469906957098821|1469906957098821|0|0|0|0
NOK
$ sqlite3 cookies.sqlite "select * from moz_cookies where baseDomain glob '*127.0.0.1*'"
$
I made a dump of this SQlite database (~/.mozilla/firefox/*.default/cookies.sqlite) and I tried to grep the the IP, but no good.
~/.mozilla/firefox/2r7mbtt8.default $ sqlite3 cookies.sqlite .dump > mozilla-30-07-2016.sql
~/.mozilla/firefox/2r7mbtt8.default $ grep --color "127.0.0.1" mozilla-30-07-2016.sql
~/.mozilla/firefox/2r7mbtt8.default $
I was checking directly on Mozilla Firefox (Privacy > remove individual cookies), that the cookie was indeed stored.
With this, I have the following questions regarding Firefox:
- Does it make some distinction when it comes to store cookies from websites that are accessed via IP address or IP+port ?
- Does it store cookies from sites accessed via IP addresses in another SQlite database?
localhost
is a very special security case for browsers. – grochmal Jul 30 '16 at 21:21