Massimo, thanks for the reply. I would appreciate if you can clarify what I should do since it is not passing validation on dotcloud. Is this a dotcloud problem and should I inform them about this.
Or, is it a problem with web2py version 2.0.9 (2012-09-13 23:51:30) stable and should I upgrade to the trunk to solve this? Thank you. On Wednesday, October 10, 2012 10:01:55 PM UTC-4, Massimo Di Pierro wrote: > > This is a security measure. Some buggy web servers pass invalid ip > addresses and this results in session information leakage. Web2py checks > this. > In your case it should pass validation. You have an old version and it is > possible this is already fixed in trunk. > > Now the validate function is in gluon/utils.py and looking at it now, it > should validate your address. > > On Wednesday, 10 October 2012 20:22:02 UTC-5, curiouslearn wrote: >> >> Hello, >> >> I was hosting a web2py application on dotcloud.com with the older >> version of web2py (I think, 1.99.7, definitely below 2.0). >> Everything was working great. >> >> To host on dotcloud the following steps were necessary and sufficient >> with that version: >> >> (i) Add a dotcloud.yml file to the web2py folder with content >> >> www: >> type: python >> db: >> type: mysql >> >> >> (ii) Change name of the setup.py file to something else such as >> setup_old.py >> >> (iii) Copy wsgihandler.py to wsgi.py. >> >> That was sufficient if you did not use any modules that did not come with >> basic python. >> You had to then just use >> >> dotcloud push <applicationname> >> >> This was truly awesome. However, after I upgraded to web2py version 2.0.9 >> and followed the same >> steps, my application stopped working. I got the following error whenever >> I visited >> my application: >> >> Bad Request (request.client=::ffff:xx:xx:xx:xxx) >> >> >> >> where xx:xx:xx:xxx was my ip address. >> >> >> >> I contact dotcloud support and the tech support told me the following (in >> his words) >> >> The current error comes from gluon/main.py line 144. This seems to be >> related to testing the IP address for validity in gluon/utils.py >> (is_valid_ip_address) which seems to be returning False. >> >> ...I suggest you dig into that function more to find out whether >> validating the ip address is important, and, if so, why this >> is_valid_ip_address failed on IPV6 addresses. >> >> Can someone please help with this? Is this a bug, or is this the intended >> behavior and I need to >> change something? I have no trouble running web2py on the localhost >> without this change. >> >> Thank you. >> > --