You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "David Rain (JIRA)" <ji...@apache.org> on 2012/06/17 12:04:42 UTC
[jira] [Created] (WICKET-4609) Javascript header references without
cookies with CryptoMapper not working
David Rain created WICKET-4609:
----------------------------------
Summary: Javascript header references without cookies with CryptoMapper not working
Key: WICKET-4609
URL: https://issues.apache.org/jira/browse/WICKET-4609
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.5
Environment: Windows 7 64-bit
IE 9, FF 12
Jetty 6, WebSphere AS 7
Reporter: David Rain
Preconditions:
- disabled cookies
- CryptoMapper enabled (set as root mapper)
When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
String urlWoSessionId = Strings.stripJSessionId(url);
which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4609) Javascript header references without
cookies with CryptoMapper not working
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-4609:
------------------------------------
Attachment: crypto-demo.tgz
Here is a demo app that shows that urls to .css resources are properly created with and without jsessionid.
Please modify it and re-attach if there are problems and we will reopen the ticket.
> Javascript header references without cookies with CryptoMapper not working
> --------------------------------------------------------------------------
>
> Key: WICKET-4609
> URL: https://issues.apache.org/jira/browse/WICKET-4609
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Environment: Windows 7 64-bit
> IE 9, FF 12
> Jetty 6, WebSphere AS 7
> Reporter: David Rain
> Labels: cookies, cryptomapper, header-contribution, javascript, reference, wicket
> Attachments: crypto-demo.tgz
>
>
> Preconditions:
> - disabled cookies
> - CryptoMapper enabled (set as root mapper)
> When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
> I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
> String urlWoSessionId = Strings.stripJSessionId(url);
> which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
> internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4609) Javascript header references
without cookies with CryptoMapper not working
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13393523#comment-13393523 ]
Martin Grigorov commented on WICKET-4609:
-----------------------------------------
This is improved in 1.5.7.
Please try and close the ticket.
> Javascript header references without cookies with CryptoMapper not working
> --------------------------------------------------------------------------
>
> Key: WICKET-4609
> URL: https://issues.apache.org/jira/browse/WICKET-4609
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Environment: Windows 7 64-bit
> IE 9, FF 12
> Jetty 6, WebSphere AS 7
> Reporter: David Rain
> Labels: cookies, cryptomapper, header-contribution, javascript, reference, wicket
>
> Preconditions:
> - disabled cookies
> - CryptoMapper enabled (set as root mapper)
> When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
> I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
> String urlWoSessionId = Strings.stripJSessionId(url);
> which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
> internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4609) Javascript header references
without cookies with CryptoMapper not working
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13393553#comment-13393553 ]
Martin Grigorov commented on WICKET-4609:
-----------------------------------------
Sorry. My answer wasn't complete.
The ticket that improved this for 1.5.7 is WICKET-4550.
The change is https://github.com/apache/wicket/commit/7a7593efa04c68220ef2f6b7084db31f7dc8a131
You may need to tweak Application.get().getResourceSettings().setEncodeJSessionId().
> Javascript header references without cookies with CryptoMapper not working
> --------------------------------------------------------------------------
>
> Key: WICKET-4609
> URL: https://issues.apache.org/jira/browse/WICKET-4609
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Environment: Windows 7 64-bit
> IE 9, FF 12
> Jetty 6, WebSphere AS 7
> Reporter: David Rain
> Labels: cookies, cryptomapper, header-contribution, javascript, reference, wicket
>
> Preconditions:
> - disabled cookies
> - CryptoMapper enabled (set as root mapper)
> When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
> I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
> String urlWoSessionId = Strings.stripJSessionId(url);
> which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
> internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4609) Javascript header references
without cookies with CryptoMapper not working
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4609.
-------------------------------------
Resolution: Not A Problem
> Javascript header references without cookies with CryptoMapper not working
> --------------------------------------------------------------------------
>
> Key: WICKET-4609
> URL: https://issues.apache.org/jira/browse/WICKET-4609
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Environment: Windows 7 64-bit
> IE 9, FF 12
> Jetty 6, WebSphere AS 7
> Reporter: David Rain
> Labels: cookies, cryptomapper, header-contribution, javascript, reference, wicket
> Attachments: crypto-demo.tgz
>
>
> Preconditions:
> - disabled cookies
> - CryptoMapper enabled (set as root mapper)
> When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
> I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
> String urlWoSessionId = Strings.stripJSessionId(url);
> which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
> internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4609) Javascript header references
without cookies with CryptoMapper not working
Posted by "David Rain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13393533#comment-13393533 ]
David Rain commented on WICKET-4609:
------------------------------------
I've tried the new 1.5.7 version and noticed following. When URLs are not crypted (when I removed CryptoMapper), javascript src attributes are now rendered WITH jsessionid parameter included.
But when I enable CryptoMapper again I noticed, that whole URL is taken (with jsessionid parametr already encoded in it) and then crypted. So web container cannot read the jsessionid parameter back and bind the request with corresponding session.
So the problem is that whole URL is crypted when CryptoMapper is set as root mapper. I don't know how to solve this, CryptoMapper will always be on top of other mappers (to make sense). Maybe twear CryptoMapper to add jsessionid once again after crypting URL?
> Javascript header references without cookies with CryptoMapper not working
> --------------------------------------------------------------------------
>
> Key: WICKET-4609
> URL: https://issues.apache.org/jira/browse/WICKET-4609
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Environment: Windows 7 64-bit
> IE 9, FF 12
> Jetty 6, WebSphere AS 7
> Reporter: David Rain
> Labels: cookies, cryptomapper, header-contribution, javascript, reference, wicket
>
> Preconditions:
> - disabled cookies
> - CryptoMapper enabled (set as root mapper)
> When contributing Javascript (CSS contributions are affected too) to head, URLs are rendered WITHOUT jsessionid. Thus CryptoMapper can't find its key in session when cookies are disabled. This affects wicket-ajax.js contribution in AbstractDefaultAjaxBehavior too! So Wicket is not working at all.
> I found out, that in HeaderResponse#internalRenderJavaScriptReference is line:
> String urlWoSessionId = Strings.stripJSessionId(url);
> which strips session id (that was previously encoded into by HttpServletResponse) from URL explicitly. I wonder WHY? Does the jsessionid parametr in URL break something else?
> internalRenderCSSReference method is affected too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira