You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Martijn Brinkers (JIRA)" <de...@tapestry.apache.org> on 2008/10/15 18:58:46 UTC

[jira] Created: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

activation context cannot contain a (URL encoded) / symbol (%2f)
----------------------------------------------------------------

                 Key: TAPESTRY-2710
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.15
            Reporter: Martijn Brinkers


If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.

example:

http://www.example.com/test/one/t%2fwo

I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo

This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Commented: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by Steven Woolley <wo...@gmail.com>.
Nevermind, I can just override the URLEncoder service.  Sorry, I just had
horrible thoughts of a lot of broken incoming links!Steve

On Thu, Dec 4, 2008 at 10:13 PM, Steven Woolley <wo...@gmail.com> wrote:

> Yuck!  I just realized this breaks all of my incoming links with spaces in
> the activation context (nice pretty bookmarkable urls) like
> http://example.com/song/greatest song in the world
>
> which the browser converts to:
>
> http://mysite.com/song/greatest%20song%20in%20the%20world
>
> which is quite readable, etc.
>
> any way to turn this off (except for a certain problematic subset, like the
> / ?)
>
> Steve
>
>

Re: [jira] Commented: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by Steven Woolley <wo...@gmail.com>.
Yuck!  I just realized this breaks all of my incoming links with spaces in
the activation context (nice pretty bookmarkable urls) like
http://example.com/song/greatest song in the world

which the browser converts to:

http://mysite.com/song/greatest%20song%20in%20the%20world

which is quite readable, etc.

any way to turn this off (except for a certain problematic subset, like the
/ ?)

Steve

[jira] Commented: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Fernando (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639975#action_12639975 ] 

Fernando commented on TAPESTRY-2710:
------------------------------------

I opened a bug on this behavior before, but did not get any traction.  (I reported it as an issue between jetty and tomcat, since they seem to have different behavior).

I really really recommend that tapestry uses a different string encoding other than URL Encoding to encode the activation context.  It may be "non standard", but it will guarantee that you can send characters you want through activation context without worrying that it will be trashed.

So I support you continueing to put pressure to get this fixed in the general case!

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAPESTRY-2710
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Martijn Brinkers
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAP5-302) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-302:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Fernando (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639977#action_12639977 ] 

Fernando commented on TAPESTRY-2710:
------------------------------------

At the moment, we have an activation context that we are passing a path ( "blah/blah" ), and I have to do my own encoding/decoding, so that the presence of a "/" won't corrupt the whole activation context.

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAPESTRY-2710
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Martijn Brinkers
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Martijn Brinkers (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639906#action_12639906 ] 

Martijn Brinkers commented on TAPESTRY-2710:
--------------------------------------------

If I return a String containing / from onPassivate / gets converted to %252F which is URL encoded version of %2f. I think this is not what it should be because other characters are not double encoded. For example returning test@example.com in onPassivate results in test%40example.com.

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAPESTRY-2710
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Martijn Brinkers
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-302) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641669#action_12641669 ] 

Howard M. Lewis Ship commented on TAP5-302:
-------------------------------------------

I think the core problem is that Jetty and Tomcat do different things and we can't rely on correct behavior.  I think we'll come up with our own, simple encoding system that will not be affected by whether Tomcat does or does not uudecode it.

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-302:
--------------------------------------

    Summary: URL encoded strings that contain symbols such as  %2f (encoded "/") are decoded incorrectly in some environments  (was: activation context cannot contain a (URL encoded) / symbol (%2f))

> URL encoded strings that contain symbols such as  %2f (encoded "/") are decoded incorrectly in some environments
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Martijn Brinkers (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639936#action_12639936 ] 

Martijn Brinkers commented on TAPESTRY-2710:
--------------------------------------------

Looking TapestryInternalUtils it seems this is intended behavior. The problem imho, is that it is non-standard encoding which makes it harder (and more error prone) to interface non-tapestry code with tapestry because instead of using standard URL encoding the caller should now use Tapestry 'special' URL encoding.

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAPESTRY-2710
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Martijn Brinkers
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2710) activation context cannot contain a (URL encoded) / symbol (%2f)

Posted by "Martijn Brinkers (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640867#action_12640867 ] 

Martijn Brinkers commented on TAPESTRY-2710:
--------------------------------------------

Another problem with context encoding is that + is not converted to a space (' '). Java's URLEncoder encoded a space as +. I would expect that Tapestry converts the + to a space. Encoding a space as a + is quite often used so I think Tapestry should support it. 

Personally I think that Tapestry should be compliant with the normal way to encode URLs and not use it's own flavor

> activation context cannot contain a (URL encoded) / symbol (%2f)
> ----------------------------------------------------------------
>
>                 Key: TAPESTRY-2710
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2710
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Martijn Brinkers
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642813#action_12642813 ] 

Martin Grotzke commented on TAP5-302:
-------------------------------------

AFAICS from svn - "%" is now custom-encoded as "$00", so that "/" becomes "$002f", or " " becomes "$0020". If that's not true please correct me :)

> URL encoded strings that contain symbols such as  %2f (encoded "/") are decoded incorrectly in some environments
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642848#action_12642848 ] 

Howard M. Lewis Ship commented on TAP5-302:
-------------------------------------------

Stand corrected:

The $ is an escape code that can be followed by:

N for null
B for blank
$ for a literal '$'
four hex digits - any other unicode character

> URL encoded strings that contain symbols such as  %2f (encoded "/") are decoded incorrectly in some environments
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAP5-302) URL encoded strings that contain symbols such as %2f (encoded "/") are decoded incorrectly in some environments

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-302.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.16

> URL encoded strings that contain symbols such as  %2f (encoded "/") are decoded incorrectly in some environments
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-302
>                 URL: https://issues.apache.org/jira/browse/TAP5-302
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> If an activation context variable contains %2f (URL encoded /) it is interpreted as / and therefore interpreted as a separation of context variables.
> example:
> http://www.example.com/test/one/t%2fwo
> I expect the above URL to contain three context variables nl: test, one and t/wo but Tapestry thinks it contains four context variables nl: test, one, t and wo
> This makes it impossible to use Base64 encoded context variables because they can contain the / symbol (which is gets URL encoded to %2f)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org