commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3d707aa29b5e/ Changeset: 3d707aa29b5e User: JanKanis Date: 2014-11-13 15:48:02+00:00 Summary: use first component of X-Forwarded-{For,Host,Scheme} X-Forwarded-{For,Host,Scheme} can contain multiple comma-separated components if there are multiple reverse proxies. Use the first (outer) one. See http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers for apache docs. Affected #: 1 file diff -r e372aaa3b3bc1ab9f9b8053d277c678647e8007a -r 3d707aa29b5e0114827ccfc70dc93d7118e8c2e1 lib/galaxy/web/framework/middleware/xforwardedhost.py --- a/lib/galaxy/web/framework/middleware/xforwardedhost.py +++ b/lib/galaxy/web/framework/middleware/xforwardedhost.py @@ -9,13 +9,13 @@ x_forwarded_host = environ.get( 'HTTP_X_FORWARDED_HOST', None ) if x_forwarded_host: environ[ 'ORGINAL_HTTP_HOST' ] = environ[ 'HTTP_HOST' ] - environ[ 'HTTP_HOST' ] = x_forwarded_host + environ[ 'HTTP_HOST' ] = x_forwarded_host.split(', ', 1)[0] x_forwarded_for = environ.get( 'HTTP_X_FORWARDED_FOR', None ) if x_forwarded_for: environ[ 'ORGINAL_REMOTE_ADDR' ] = environ[ 'REMOTE_ADDR' ] - environ[ 'REMOTE_ADDR' ] = x_forwarded_for + environ[ 'REMOTE_ADDR' ] = x_forwarded_for.split(', ', 1)[0] x_url_scheme = environ.get( 'HTTP_X_URL_SCHEME', None ) if x_url_scheme: environ[ 'original_wsgi.url_scheme' ] = environ[ 'wsgi.url_scheme' ] - environ[ 'wsgi.url_scheme' ] = x_url_scheme + environ[ 'wsgi.url_scheme' ] = x_url_scheme.split(', ', 1)[0] return self.app( environ, start_response ) https://bitbucket.org/galaxy/galaxy-central/commits/25698b985bf5/ Changeset: 25698b985bf5 User: dannon Date: 2014-11-25 16:32:20+00:00 Summary: Merged in JanKanis/galaxy-central (pull request #560) use first component of X-Forwarded-{For,Host,Scheme} Affected #: 1 file diff -r 69a6f901230540012d38f17adb1995d96f6a5dba -r 25698b985bf51cbd732025d9f84444019c788ef4 lib/galaxy/web/framework/middleware/xforwardedhost.py --- a/lib/galaxy/web/framework/middleware/xforwardedhost.py +++ b/lib/galaxy/web/framework/middleware/xforwardedhost.py @@ -9,13 +9,13 @@ x_forwarded_host = environ.get( 'HTTP_X_FORWARDED_HOST', None ) if x_forwarded_host: environ[ 'ORGINAL_HTTP_HOST' ] = environ[ 'HTTP_HOST' ] - environ[ 'HTTP_HOST' ] = x_forwarded_host + environ[ 'HTTP_HOST' ] = x_forwarded_host.split(', ', 1)[0] x_forwarded_for = environ.get( 'HTTP_X_FORWARDED_FOR', None ) if x_forwarded_for: environ[ 'ORGINAL_REMOTE_ADDR' ] = environ[ 'REMOTE_ADDR' ] - environ[ 'REMOTE_ADDR' ] = x_forwarded_for + environ[ 'REMOTE_ADDR' ] = x_forwarded_for.split(', ', 1)[0] x_url_scheme = environ.get( 'HTTP_X_URL_SCHEME', None ) if x_url_scheme: environ[ 'original_wsgi.url_scheme' ] = environ[ 'wsgi.url_scheme' ] - environ[ 'wsgi.url_scheme' ] = x_url_scheme + environ[ 'wsgi.url_scheme' ] = x_url_scheme.split(', ', 1)[0] return self.app( environ, start_response ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org