You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marcin Muras (JIRA)" <de...@myfaces.apache.org> on 2009/01/22 10:45:59 UTC

[jira] Created: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
----------------------------------------------------------------------------------------

                 Key: TOMAHAWK-1388
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.8
            Reporter: Marcin Muras


Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
It prevent any browser from caching such image.

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


[jira] Resolved: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Hazem Saleh (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hazem Saleh resolved TOMAHAWK-1388.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.9-SNAPSHOT

I fixed this bug.
Enjoy using Tomahawk CAPTCHA!

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Commented: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Hazem Saleh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666462#action_12666462 ] 

Hazem Saleh commented on TOMAHAWK-1388:
---------------------------------------

To prevent browser from caching the image, a dummy random parameter should be added to the parameters.

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Issue Comment Edited: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Hazem Saleh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666463#action_12666463 ] 

hazems edited comment on TOMAHAWK-1388 at 1/23/09 2:23 AM:
----------------------------------------------------------------

Oh yes!
I got your point.
It should be "&dummyParameter="+ System.currentTimeMillis();
I do not know how it worked fine firstly :).

      was (Author: hazems):
    Oh yes!
I got your point.
It should be "?dummyParameter="+ System.currentTimeMillis();
I do not know how it worked fine :).
  
> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Commented: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Marcin Muras (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666109#action_12666109 ] 

Marcin Muras commented on TOMAHAWK-1388:
----------------------------------------

I use tomahawk with RichFaces 3.2.2.GA.
Behaviour is realy strange because when I don't use AJAX in all browser everything works fine.

When I reRender fragment (with captcha) using ajax:
- Firefox 3.0.5 - works fine
- Safari 3.1.1 - do not refresh captcha image
- IE 7.0.5 - do not refresh captcha image

Now I see that maybe it is not browser cache problem because not only image do not change but also captcha string. It see like richfaces reRender do not force captcha to change their value in some environment.

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Commented: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Hazem Saleh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666463#action_12666463 ] 

Hazem Saleh commented on TOMAHAWK-1388:
---------------------------------------

Oh yes!
I got your point.
It should be "?dummyParameter="+ System.currentTimeMillis();
I do not know how it worked fine :).

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Commented: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666447#action_12666447 ] 

Simon Kitching commented on TOMAHAWK-1388:
------------------------------------------

The committed patch does this:
   writer.writeAttribute(HTML.SRC_ATTR, url + "dummyParameter="  + System.currentTimeMillis(), null);

Was that perhaps meant to be
   url+"?dummyParameter=" ...

?

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Commented: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Hazem Saleh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666102#action_12666102 ] 

Hazem Saleh commented on TOMAHAWK-1388:
---------------------------------------

Could you please tell me in which browser, and what is the scenario so I can replicate the bug?

> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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


[jira] Issue Comment Edited: (TOMAHAWK-1388) CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.

Posted by "Marcin Muras (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666109#action_12666109 ] 

murasm edited comment on TOMAHAWK-1388 at 1/22/09 2:16 AM:
-----------------------------------------------------------------

I use tomahawk with RichFaces 3.2.2.GA.
Behaviour is realy strange because when I don't use AJAX in all browser everything works fine.

When I reRender fragment (with captcha) using ajax (see code below):
- Firefox 3.0.5 - works fine
- Safari 3.1.1 - do not refresh captcha image
- IE 7.0.5 - do not refresh captcha image

Now I see that maybe it is not browser cache problem because not only image do not change but also captcha string. It see like richfaces reRender do not force captcha to change their value in some environment.

Code:
...
<a4j:form>
<a4j:outputPanel id="captcha-panel">
   <a4j:commandLink reRender="captcha-panel" ajaxSingle="true">
      Refresh captcha
   </a4j:commandLink>
   <t:captcha captchaSessionKeyName="captchaKey" id="captcha" />				 
</a4j:outputPanel>
</a4j:form>
..

      was (Author: murasm):
    I use tomahawk with RichFaces 3.2.2.GA.
Behaviour is realy strange because when I don't use AJAX in all browser everything works fine.

When I reRender fragment (with captcha) using ajax:
- Firefox 3.0.5 - works fine
- Safari 3.1.1 - do not refresh captcha image
- IE 7.0.5 - do not refresh captcha image

Now I see that maybe it is not browser cache problem because not only image do not change but also captcha string. It see like richfaces reRender do not force captcha to change their value in some environment.
  
> CAPTCHA - Add random string to image url. It prevent browser from caching captcha image.
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1388
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1388
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Marcin Muras
>            Assignee: Hazem Saleh
>
> Some browser caches image generated by captcha component. It could be greate to have some parameter (e.g. randomString="true/false") telling component to add some random param to image url.
> It prevent any browser from caching such image.

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