diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2015-04-02 07:10:08 (GMT) |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2015-04-02 07:10:08 (GMT) |
commit | afecd5d190cde3190324d7a6ac21196dc33a0955 (patch) | |
tree | 1cf4ef69073bcf64f83f69dcdfea973074c3ad98 | |
parent | 81684b443784c7f2adbe964c1eedf599aadcabe9 (diff) | |
download | kolab-wap-master.tar.gz |
-rw-r--r-- | lib/kolab_api_controller.php | 4 | ||||
-rw-r--r-- | lib/kolab_client_task.php | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php index f3f20bb..daeb30c 100644 --- a/lib/kolab_api_controller.php +++ b/lib/kolab_api_controller.php @@ -303,8 +303,8 @@ class kolab_api_controller $_SESSION['user'] = new User(); $attributes = null; $password = $postdata['password']; - $username = $postdata['username']; - $domain = $postdata['domain']; + $username = trim($postdata['username']); + $domain = trim($postdata['domain']); // find user domain if (empty($domain)) { diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php index 132f8d7..f521d17 100644 --- a/lib/kolab_client_task.php +++ b/lib/kolab_client_task.php @@ -202,6 +202,9 @@ class kolab_client_task $login = $this->get_input('login', 'POST'); if ($login['username']) { + $login['username'] = trim($login['username']); + $login['domain'] = trim($login['domain']); + $result = $this->api->login($login['username'], $login['password'], $login['domain'], true); if ($token = $result->get('session_token')) { @@ -516,8 +519,7 @@ class kolab_client_task $type = kolab_utils::REQUEST_ANY; } - $result = kolab_utils::get_input($name, $type, $allow_html); - return $result; + return kolab_utils::get_input($name, $type, $allow_html); } /** |