Subject: python-x2gobroker web/plain module strips passwords breaking passwords that start or end with a space

From: Jason Alavaliant <[email-masked]>
Date: Mon, 05 Jan 2015 18:08:16 +1300

Package: python-x2gobroker
Version: 0.0.2.3
Tags: patch

One of my users was getting their authentication failing when connecting 
to an x2go broker using the http plain backend.     Testing revealed 
that their password ended with a space which the web/plain module 
default code was automatically stripping off before passing through to 
the authservice.    The attached patch disables stripping for the 
password argument so passwords starting/ending with spaces are no longer 
incorrectly rejected.

Thanks
Jason

--- old/plain.py	2015-01-05 17:19:45.498564605 +1300
+++ new/plain.py	2015-01-05 17:16:47.958958740 +1300
@@ -96,7 +96,7 @@
             raise tornado.web.HTTPError(404)
 
         username = self.get_argument('user', default='')
-        password = self.get_argument('password', default='')
+        password = self.get_argument('password', default='', strip=False)
         cookie = self.get_argument('cookie', default='')
         task = self.get_argument('task', default='')
         profile_id = self.get_argument('sid', default='')