If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

too many entries cookperm.txt cause image functions to stop working

RESOLVED DUPLICATE of bug 62057

Status

()

Core
Image Blocking
P3
normal
RESOLVED DUPLICATE of bug 62057
17 years ago
15 years ago

People

(Reporter: Peter Janes, Assigned: Stephen P. Morse)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22 i686; en-US; m18) Gecko/20001205
BuildID:    2000120508

The cookie and image managers and 'View Image' will stop working as soon as a
numeric entry is added to cookperm.txt.  'View Image' gives a JavaScript error,
and the image and cookie managers have no entries.


Reproducible: Always
Steps to Reproduce:
1. Set up Mozilla to prompt for cookies and/or images.
2. Navigate to some sites to populate the cookperm.txt.
3. Open the cookie/image manager to see that there are entries displayed.
4. Navigate to an IP address or a site beginning with a number (e.g. 127.0.0.1)
that will load an image or set a cookie.  Alternately, exit Mozilla, and add '127.0.0.1	0F	0F'
(or any other address starting with a number) to the top of cookperm.txt.
5. Start Mozilla.
6. Open the cookie/image manager and note that cookies are shown, but not cookie
or image sites.
7. Close Mozilla and remove the numeric entry from cookperm.txt.
8. Start Mozilla, and open the cookie/image manager and note that the sites are
shown again.

Actual Results:  The cookie and image site lists are empty.  Also, if you choose
'View Image' from the browser's context menu, three JavaScript errors will be
reported on the console:

JavaScript error:
chrome://communicator/content/nsContextMenu.js line 532: permStr has no properties

JavaScript error:
 line 0: contextMenu has no properties

JavaScript error:
 line 0: contextMenu has no properties

Expected Results:  The cookie and image site lists should display the
appropriate entries from cookperm.txt.
->Cookies, I think.
Assignee: mstoltz → morse
Component: Security: General → Cookies
QA Contact: ckritzer → tever
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Whiteboard: [x]
(Assignee)

Comment 2

17 years ago
I have the feeling that the reporter might have been confused by the symptoms 
that he reported.  Specifically, I don't think that the numeric entry had 
anything to do with it -- adding any entry would have had the same effect.

Turns out there is a hard-coded limit on the size of a buffer used in 
nsCookie.cpp.  See bug 62057.  I believe that this is what you were running 
into.

I'm currently working on a fix for that bug.

*** This bug has been marked as a duplicate of 62057 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 3

17 years ago
It definitely looked similar at the time, but seemed to behave differently.  My
original test was to remove all of the entries that were numeric, and the image
manager started working.  When I added a numeric entry, it stopped.  If I added
a text entry, the image manager still worked.

As long as the root cause has been discovered! 8^)
(Assignee)

Comment 4

17 years ago
I tried it with a very small cookperm.txt file and added a numeric entry.  It 
did not present any problem.

I suspect that what was happening in your case was that the numeric entry and 
the non-numeric entry were of different sizes.  The problem is not on the number 
of total entries but on the number of total characters in all the entries.  So 
adding the non-numeric entry in your case might not have put you over the limit 
but adding the (probably longer) numberic entry did.
(Assignee)

Updated

17 years ago
Whiteboard: [x]

Updated

15 years ago
Component: Cookies → Image Blocking
QA Contact: tever → nobody
Summary: Numeric entries in cookperm.txt cause image functions to stop working → too many entries cookperm.txt cause image functions to stop working
You need to log in before you can comment on or make changes to this bug.