commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/46c3d2a06212/ Changeset: 46c3d2a06212 Branch: next-stable 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 c1a9ed13d5f71deb671ab83ed262c0a861c469d2 -r 46c3d2a06212b61a0ab14d7790bf1167dc65b653 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/df35b41ceaac/ Changeset: df35b41ceaac Branch: next-stable User: dannon Date: 2014-11-25 16:33:26+00:00 Summary: Remove unnecessary split on wsgi.url_scheme Affected #: 1 file diff -r 46c3d2a06212b61a0ab14d7790bf1167dc65b653 -r df35b41ceaac11150513913f86926a379094b09d lib/galaxy/web/framework/middleware/xforwardedhost.py --- a/lib/galaxy/web/framework/middleware/xforwardedhost.py +++ b/lib/galaxy/web/framework/middleware/xforwardedhost.py @@ -5,6 +5,7 @@ """ def __init__( self, app, global_conf=None ): self.app = app + def __call__( self, environ, start_response ): x_forwarded_host = environ.get( 'HTTP_X_FORWARDED_HOST', None ) if x_forwarded_host: @@ -17,5 +18,5 @@ 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.split(', ', 1)[0] + environ[ 'wsgi.url_scheme' ] = x_url_scheme 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