You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Vasily Shestkov (JIRA)" <ji...@apache.org> on 2010/06/21 13:32:23 UTC

[jira] Created: (SHIRO-177) Wron SimpleCookie expires locale

Wron SimpleCookie expires locale
--------------------------------

                 Key: SHIRO-177
                 URL: https://issues.apache.org/jira/browse/SHIRO-177
             Project: Shiro
          Issue Type: Bug
          Components: Session Management
    Affects Versions: 0.9-RC1, 0.9, 1.0.0, 1.0.1, 1.1.0, Incubation
         Environment: Windows XP, Jetty
            Reporter: Vasily Shestkov


SimpleCookie.toCookieDate method to format cookie uses default locale. My default locale ru_RU. When browser receive cookie with expires formatted in non en_US locale, browser set cookie expires=session.

Resolutiojon of this trouble is: 

    private static String toCookieDate(Date date) {
        TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID);
        DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US);
        fmt.setTimeZone(tz);
        return fmt.format(date);
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHIRO-177) Wron SimpleCookie expires locale

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen resolved SHIRO-177.
----------------------------------

    Fix Version/s: 1.0.1
                   1.1.0
       Resolution: Fixed

Fixed both in 1.0.1 and 1.1.0 branches but since there's a workaround (see the duplicate issue), not critical enough to alone warrant the release of Shiro 1.0.1

> Wron SimpleCookie expires locale
> --------------------------------
>
>                 Key: SHIRO-177
>                 URL: https://issues.apache.org/jira/browse/SHIRO-177
>             Project: Shiro
>          Issue Type: Bug
>          Components: Session Management
>    Affects Versions: 0.9-RC1, 0.9, 1.0.0, 1.0.1, 1.1.0, Incubation
>         Environment: Windows XP, Jetty
>            Reporter: Vasily Shestkov
>            Assignee: Kalle Korhonen
>             Fix For: 1.0.1, 1.1.0
>
>
> SimpleCookie.toCookieDate method to format cookie uses default locale. My default locale ru_RU. When browser receive cookie with expires formatted in non en_US locale, browser set cookie expires=session.
> Resolutiojon of this trouble is: 
>     private static String toCookieDate(Date date) {
>         TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID);
>         DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US);
>         fmt.setTimeZone(tz);
>         return fmt.format(date);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SHIRO-177) Wron SimpleCookie expires locale

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen reassigned SHIRO-177:
------------------------------------

    Assignee: Kalle Korhonen

> Wron SimpleCookie expires locale
> --------------------------------
>
>                 Key: SHIRO-177
>                 URL: https://issues.apache.org/jira/browse/SHIRO-177
>             Project: Shiro
>          Issue Type: Bug
>          Components: Session Management
>    Affects Versions: 0.9-RC1, 0.9, 1.0.0, 1.0.1, 1.1.0, Incubation
>         Environment: Windows XP, Jetty
>            Reporter: Vasily Shestkov
>            Assignee: Kalle Korhonen
>
> SimpleCookie.toCookieDate method to format cookie uses default locale. My default locale ru_RU. When browser receive cookie with expires formatted in non en_US locale, browser set cookie expires=session.
> Resolutiojon of this trouble is: 
>     private static String toCookieDate(Date date) {
>         TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID);
>         DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US);
>         fmt.setTimeZone(tz);
>         return fmt.format(date);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.