[icedtea-web] RFC: Fix for cookie handling bug (rhbz# 665104)

Deepak Bhole dbhole at redhat.com
Wed Dec 22 13:38:54 PST 2010


* Deepak Bhole <dbhole at redhat.com> [2010-12-22 16:38]:
> Hi,
> 
> There is a bug in the current version of the plugin that causes the
> first cookie set by a server to be skipped:
> https://bugzilla.redhat.com/show_bug.cgi?id=665104
> 
> Attached patch fixes the issue.
> 
> ChangeLog:
> 
> 2010-12-22  Deepak Bhole <dbhole at redhat.com>
> 
>    RH665104: OpenJDK Firefox Java plugin loses a cookie
>    * plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java
>    (parseReturn): Skip one less space so that the first cookie is not
>    skipped.
>    * NEWS: Updated.
> 
> Cheers,
> Deepak

Forgot to mention -- this is a very valid bug and I think it deserves to
be backported to 1.0 branch.

Cheers,
Deepak

> diff -r bbbe02c58ddc NEWS
> --- a/NEWS	Mon Dec 20 13:37:59 2010 -0500
> +++ b/NEWS	Wed Dec 22 16:33:18 2010 -0500
> @@ -23,6 +23,7 @@
>    - PR593: Increment of invalidated iterator in IcedTeaPluginUtils (patch from barbara.xxx1975 at libero.it)
>    - PR597: Entities are parsed incorrectly in PARAM tag in applet plugin
>    - Applets are now double-buffered to eliminate flicker in ones that do heavy drawing
> +  - RH665104: OpenJDK Firefox Java plugin loses a cookie
>  * NetX
>    - Add a new option -Xclearcache
>    - Interfaces javax.jnlp.IntegrationService and javax.jnlp.DownloadService2 are now available
> diff -r bbbe02c58ddc plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java
> --- a/plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java	Mon Dec 20 13:37:59 2010 -0500
> +++ b/plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java	Wed Dec 22 16:33:18 2010 -0500
> @@ -56,12 +56,16 @@
>  
>          PluginDebug.debug("PluginCookieInfoRequest GOT: " + cookieInfo);
>  
> -        // Skip the first 5 components. We are guaranteed 5 components, 
> -        // so no index -1 to worry about
> +        // skip 'plugin' marker
>          cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ') + 1);
> +
> +        // skip 'PluginCookieInfo' tag
>          cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ') + 1);
> +
> +        // skip 'reference' tag
>          cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ') + 1);
> -        cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ') + 1);
> +
> +        // skip reference # and get the rest
>          cookieString = cookieInfo.substring(cookieInfo.indexOf(' ') + 1);
>  
>          setDone(true);




More information about the distro-pkg-dev mailing list