2008/11/27 mdipierro <[EMAIL PROTECTED]>

>
> Thank you Jessinio,
>
> could you please email me the patch as an attachment? I cannot read it
> properly.
>
> Does anybody have any objection to this patch?


sorry , i don't know , i know it work well (^_^)

see diff file attachment






-- 
身体是革命的本钱!!
http://jessinio.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

--- /tmp/web2py-read-only/gluon/main.py	2008-11-27 09:45:52.000000000 +0800
+++ /home/jessinio/download/web2py/gluon/main.py	2008-11-27 11:35:10.000000000 +0800
@@ -36,7 +36,7 @@
 
 ### Security Checks: validate URL and session_id here, accept_language is validated in languages
 # pattern to find valid paths in url /application/controller/...
-regex_url=re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/\w+/?$)|(?:^(\w+/){2}\w+/?$)|(?:^(\w+/){2}\w+(/[\w\-]+(\.[\w\-]+)*)+$)|(?:^(\w+)/static(/[\w\-]+(\.[\w\-]+)*)+$)')
+regex_url=re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/\w+/?$)|(?:^(\w+/){2}\w+/?$)|(?:^(\w+/){2}\w+(/[\w\-]+(\.[\w\-]+)*)+$)|(?:^(\w+)/static(/[\w\-]+(\.[\w\-]+)*)+$)',re.U)
 # patter used to validate client address
 regex_client=re.compile('[\w\-]+(\.[\w\-]+)*\.?')
 
@@ -125,8 +125,10 @@
                 if len(items)>1: request.env.query_string=items[1]
                 else: request.env.query_string=''
             path=request.env.path_info[1:].replace('\\','/')
+            path = unicode(path, "utf8")
             if not regex_url.match(path):
                 raise HTTP(400,error_message,web2py_error='invalid path')
+            path = path.encode('utf8')
             items=path.split('/')
             ###################################################
             # serve if a static file

Reply via email to