Last modified: 2014-01-15 18:16:33 UTC
In wikimetrics/config/web_config.yaml, line 31, we set SERVER_HOST to '0.0.0.0'. I suggest we change this to "localhost". When I go to 0.0.0.0:5000 and try to log in with Google auth (using OAuth), I get an error. With localhost:5000, it works. And we refer to 'localhost:5000' in README.md and in various .yaml files in config/ . The error I get when I try to do an OAuth login at 0.0.0.0:5000 is: File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__ return self.wsgi_app(environ, start_response) File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app response = self.full_dispatch_request() File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request rv = self.dispatch_request() File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask_oauth.py", line 429, in decorated data = self.handle_oauth2_response() File "/home/sumanah/.virtualenvs/metrics/lib/python2.7/site-packages/flask_oauth.py", line 407, in handle_oauth2_response type='invalid_response', data=data) OAuthException: Invalid response from google If people are fine with this change then I'm happy to submit a patch.
localhost could presumably result in a dns lookup. Use 127.0.0.1?
The OAuth consumers are registered to redirect to localhost unfortunately. I think it's ok in this case, the DNS lookup should be handled by /etc/hosts before it goes anywhere. You're right Sumana, I'll change it
Change 106509 had a related patch set uploaded by Gerrit Patch Uploader: change SERVER_HOST from 0.0.0.0 to localhost https://gerrit.wikimedia.org/r/106509
Change 106509 merged by Milimetric: change SERVER_HOST from 0.0.0.0 to localhost https://gerrit.wikimedia.org/r/106509
git master works fine now.