cherrypt.url doen't encode url "prefix"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cherrypt.url doen't encode url "prefix"

bogun.dmitriy
Hello.

In many cases cherrypy.url used to create absolute url path from relative. To do this, it append it's argument "path" to cherrypy.request.path_info. And here the pbolbem araises - whie cliend code can control quote status sent "path" argument, it have no controll over quote status of attached prefix(cherrypy.query.path_info).

If path_info contain for example "/a/b/разные_utf8_символы/" and we call cherrypy.url('c'), we receive incorrect url! And violate http spec, if it will be used in redirect.

Attach contain my proposition on fixing this.

PS cp-3.2.0

--
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.

cp_url_fix.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cherrypt.url doen't encode url "prefix"

bogun.dmitriy
23 декабря 2011 г. 2:00 пользователь <[hidden email]> написал:
Hello.

In many cases cherrypy.url used to create absolute url path from relative. To do this, it append it's argument "path" to cherrypy.request.path_info. And here the pbolbem araises - whie cliend code can control quote status sent "path" argument, it have no controll over quote status of attached prefix(cherrypy.query.path_info).

If path_info contain for example "/a/b/разные_utf8_символы/" and we call cherrypy.url('c'), we receive incorrect url! And violate http spec, if it will be used in redirect.

Attach contain my proposition on fixing this.

PS cp-3.2.0

Is anyone care about not ASCII support, except me? Is this patch will be applied to upstream?

--
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.
Loading...