Last Comment Bug 240201 - remove [noscript] from nsICookieManager2::add
: remove [noscript] from nsICookieManager2::add
Status: RESOLVED FIXED
[nvn-dl]
: fixed1.8.0.2, fixed1.8.1
Product: Core
Classification: Components
Component: Networking: Cookies (show other bugs)
: Trunk
: All All
: P1 trivial (vote)
: mozilla1.8.1
Assigned To: Darin Fisher
:
:
Mentors:
: 331254 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-10 21:08 PDT by Mathieu Fenniak
Modified: 2006-03-22 12:53 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 patch (1.11 KB, patch)
2006-02-22 15:34 PST, Darin Fisher
bzbarsky: review+
bzbarsky: superreview+
dveditz: approval‑branch‑1.8.1+
dveditz: approval1.8.0.2+
Details | Diff | Splinter Review

Description Mathieu Fenniak 2004-04-10 21:08:47 PDT
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1
Build Identifier: 

I've built a Mozilla/Firefox extension that allows a web developer to edit cookies.  The only problem is 
that while nsICookieManager provides an interface to remove and read cookies, it does not provide a 
corresponding method to add a cookie.  nsICookieManager2 has a perfectly appropriate method, but it 
is marked [noscript].  If this were removed, my extension would work.  I cannot find any other way to 
do this - nsICookieService's API is not similar and doesn't allow the same direct access to the cookie 
database.

I don't know of any reason for this method to be [noscript].  Is there any?

Reproducible: Always
Steps to Reproduce:
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2004-04-10 21:34:19 PDT
> I don't know of any reason for this method to be [noscript].  Is there any?

I'm not sure that PRInt64 can be reflected into JS.  But more to the point, this
whole method is "not for public consumption", as the comments say.  Is there a
reason nsICookieService is not sufficient for your needs?
Comment 2 dwitte@gmail.com 2004-04-10 23:31:33 PDT
How does your extension allow editing of cookies? By removing and adding the cookie?
Comment 3 Gervase Markham [:gerv] 2005-09-27 02:05:21 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 4 Gervase Markham [:gerv] 2005-10-13 10:39:29 PDT
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Comment 5 Darin Fisher 2006-02-22 15:33:20 PST
I'm reopening this bug.  It should never have been closed.  Gerv! ;-)

(In reply to comment #1)
> > I don't know of any reason for this method to be [noscript].  Is there any?
> 
> I'm not sure that PRInt64 can be reflected into JS.  But more to the point, this
> whole method is "not for public consumption", as the comments say.  Is there a
> reason nsICookieService is not sufficient for your needs?

PRInt64 is completely scriptable.  nsICookieService is not sufficient because it may result in the user being prompted to accept new cookies.  That prevents extensions from doing clever and possibly useful things with the cookie database.
Comment 6 Darin Fisher 2006-02-22 15:34:50 PST
Created attachment 212822 [details] [diff] [review]
v1 patch

trivial patch.
Comment 7 Darin Fisher 2006-02-22 15:36:11 PST
Comment on attachment 212822 [details] [diff] [review]
v1 patch

I'd really like this to be fixed for FF 1.5.0.2 if possible.  I have this JS-only extension that could really benefit from this.
Comment 8 Boris Zbarsky [:bz] (still a bit busy) 2006-02-22 18:06:04 PST
Comment on attachment 212822 [details] [diff] [review]
v1 patch

r+sr=bzbarsky.  Should we work on freezing this?
Comment 9 Darin Fisher 2006-02-22 18:07:59 PST
yes, perhaps we should.
Comment 10 Darin Fisher 2006-02-22 18:08:35 PST
fixed-on-trunk
Comment 11 Daniel Veditz [:dveditz] 2006-02-23 11:55:54 PST
Comment on attachment 212822 [details] [diff] [review]
v1 patch

Sorry, doesn't fit in scope of security/stability release, and too late for a ride-along
Comment 12 Daniel Veditz [:dveditz] 2006-02-23 17:29:44 PST
Comment on attachment 212822 [details] [diff] [review]
v1 patch

Darin convinced us, approved for 1.8.0 branch, a=dveditz for drivers
Comment 13 Darin Fisher 2006-02-23 17:34:22 PST
fixed1.8.1, fixed1.8.0.2
Comment 14 Michiel van Leeuwen (email: mvl+moz@) 2006-03-22 12:53:40 PST
*** Bug 331254 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.