Re: Cookie handling in (Python) extensions



Hi,

Le vendredi 02 mars 2007 à 11:19 +0100, Christian von Kietzell a écrit :
> looking at bug #337826 [0] and seeing that it was only classified as
> enhancement I wanted to solve the problem another way, by writing an
> extension that would pop up a dialogue asking me for confirmation before
> allowing a cookie to be set.
> 
> I used to set the network.cookie.lifetimePolicy option in about:config
> to 1. But then Epiphany started hanging when loading certain sites
> (don't ask me exactly what version this first happened with). I reported
> this on the Debian BTS (#357904 [1]). It was forwarded to the approriate
> bug on Gnome bugzilla ([0]).

I just tried setting the lifetimePolicy to 1, and on visiting a site
that wants to set a cookie, the cookie prompt shows up (a XUL window,
not a native window). But clicking any buttons in the dialogue didn't
close it, only closing with the window close button had any effect. This
seems to be like bug 393837 for the certificate manager; and I've never
found out what's causing that...

> Now, I can list all cookies and so on via the CookieManager but I don't
> know how to hook into the process when a website requests one.

I think what you need to do is to implement a native cookie prompt
service; see galeon's galeon/mozilla/CookiePromptService.cpp code for
how to.

Regards,
	Christian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]