[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.0.5-66-gd1b123d

X2Go dev team git-admin at x2go.org
Sun May 19 13:03:24 CEST 2013


The branch, build-main has been updated
       via  d1b123d29807d11997c79697ac7b998264ed2fea (commit)
      from  83b347f272687471a93d46449704893256ca88de (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2gobroker/web/html.py  |    2 +-
 x2gobroker/web/plain.py |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
index 9992936..a604239 100644
--- a/x2gobroker/web/html.py
+++ b/x2gobroker/web/html.py
@@ -65,6 +65,7 @@ $output
             self.add_header(http_header_item, self.http_header_items[http_header_item])
 
     def get(self, backend):
+        self._gen_http_header()
         return self.post(backend)
 
     def post(self, backend):
@@ -92,7 +93,6 @@ $output
         new_password = self.get_argument('newpass', default='')
 
         output = ''
-        self._gen_http_header()
 
         if broker_backend.check_access(username=username, password=password, authid=authid):
 
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index a3a6c16..006a539 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -43,6 +43,7 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
 
     def get(self, backend):
         if x2gobroker.defaults.X2GOBROKER_DEBUG:
+            self._gen_http_header()
             logger_broker.warn('GET http request detected, if unwanted: disable X2GOBROKER_DEBUG')
             return self.post(backend)
         raise tornado.web.HTTPError(404)
@@ -61,6 +62,10 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
         exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
         global_config = broker_backend.get_global_config()
 
+        # if the broker backend is disabled in the configuration, pretend to have nothing on offer
+        if not broker_backend.is_enabled():
+            raise tornado.web.HTTPError(404)
+
         # set the client address for the broker backend
         ip = self.request.remote_ip
         if ip:
@@ -71,10 +76,6 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
             logger_error.error('client could not provide an IP address, pretending: 404 Not Found')
             raise tornado.web.HTTPError(404)
 
-        # if the broker backend is disabled in the configuration, pretend to have nothing on offer
-        if not broker_backend.is_enabled():
-            raise tornado.web.HTTPError(404)
-
         username = self.get_argument('user', default='')
         password = self.get_argument('password', default='')
         cookie = self.get_argument('cookie', default='')
@@ -83,7 +84,6 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
         new_password = self.get_argument('newpass', default='')
 
         output = ''
-        self._gen_http_header()
 
         logger_broker.debug ('username: {username}, password: {password}, task: {task}, profile_id: {profile_id}'.format(username=username, password='XXXXX', task=task, profile_id=profile_id))
         if broker_backend.check_access(username=username, password=password, cookie=cookie):


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list