Projects
Kolab:16:Enterprise
kolab-hkccp
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 15
View file
kolab-hkccp.spec
Changed
@@ -3,7 +3,7 @@ %endif Name: kolab-hkccp -Version: 0.7.24 +Version: 0.7.25 Release: 1%{?dist} Summary: Hosted Kolab Customer Control Panel License: AGPLv3+ @@ -104,6 +104,9 @@ %attr(0770,apache,apache) %{_var}/log/%{name} %changelog +* Tue Jul 2 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.7.25-1 +- Release of version 0.7.25 + * Wed Apr 17 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.7.24-1 - Release of version 0.7.24
View file
kolab-hkccp-0.7.24.tar.gz/composer.phar -> kolab-hkccp-0.7.25.tar.gz/composer.phar
Changed
View file
kolab-hkccp-0.7.24.tar.gz/lib/Kolab/Hosted/Controller/FrontendController.php -> kolab-hkccp-0.7.25.tar.gz/lib/Kolab/Hosted/Controller/FrontendController.php
Changed
@@ -538,7 +538,7 @@ if ($valid) { // submit the new password to the backend $kolabuser = new KolabUser($account->UUID); - if ($kolabuser->reset(array('userpassword' => $valid['password']))) { + if ($kolabuser->set_password($valid['password'])) { $account->set_attributes(array('forgotpasswordhash' => null)); $this->output->add_message(T('login.reset.success'), 'success'); $this->output->redirect('/login');
View file
kolab-hkccp-0.7.24.tar.gz/lib/Kolab/Hosted/Model/KolabUser.php -> kolab-hkccp-0.7.25.tar.gz/lib/Kolab/Hosted/Model/KolabUser.php
Changed
@@ -595,59 +595,39 @@ /** * Reset a user's password * - * @param array $tags An associative array containing column-value pairs. - * @param array $errors Reference to errors variable + * @param string $password Password + * @param array $errors Reference to errors variable * * @return boolean True on success, False on failure */ - public function reset(array $tags, &$errors = array()) + public function set_password($password, &$errors = array()) { - $updates = 0; - $success = true; - $log_data = array('changed' => array()); - - // sanity check - if (empty($this->_ldapdata)) { + // sanity checks + if (empty($this->UUID) || !is_string($password) || !strlen($password)) { return false; } - if (!empty($tags['userpassword'])) { - $this->_ldapdata['userpassword'] = $tags['userpassword']; - $log_data['changed'][] = 'userpassword'; - $updates++; - } - unset($tags['userpassword']); - - // save changes to LDAP - if ($updates) { - $api = API\Client::get_user_instance(); - $config = Config::get_instance(); - - $api->login( - $config->get('kolab_wap.backend_auth_dn'), - $config->get('kolab_wap.backend_auth_pw') - ); - - list(, $domain) = explode('@', $this->email); - $api->select_domain($domain); + $api = API\Client::get_user_instance(); + $config = Config::get_instance(); + $post = array( + 'id' => $this->UUID, + 'password' => $password, + ); - $success = self::parse_api_result($api->post('user.edit', array(), $this->_ldapdata), 'user.edit', $api_error); + list(, $domain) = explode('@', $this->email); - if ($success) { - $log_data['action'] = 'password-reset'; - $log_data = array_merge($log_data, $this->_ldapdata); + $api->login($config->get('kolab_wap.backend_auth_dn'), $config->get('kolab_wap.backend_auth_pw')); + $api->select_domain($domain); - // we don't want to log user passwords - unset($log_data['userpassword']); - } - else if ($api_error) { - $errors = self::parse_api_error($api_error, $tags); - } + $success = self::parse_api_result($api->post('user.password', array(), $post), 'user.password', $api_error); - $api->logout(); + if (!$success && $api_error) { + $errors = self::parse_api_error($api_error); } - Audit::log($this->account, $this->UUID, 'kolabuser.update', $success ? $log_data : false); + $api->logout(); + + Audit::log($this->account, $this->UUID, 'kolabuser.password-reset', (bool) $success); return $success; } @@ -1632,7 +1612,7 @@ * Parse API error from parse_api_result() and build error array * according to form data to display nice validation errors in the form. */ - private static function parse_api_error($error, $formdata) + private static function parse_api_error($error, $formdata = array()) { if ($error_code = key($error)) { $error_str = $error[$error_code];
View file
kolab-hkccp-0.7.24.tar.gz/lib/Kolab/Payment/Stripe/API.php -> kolab-hkccp-0.7.25.tar.gz/lib/Kolab/Payment/Stripe/API.php
Changed
@@ -295,8 +295,8 @@ try { $request = array( - 'amount' => $this->auth_request['AMOUNT'] * 100, - 'currency' => $this->auth_request['CURRENCY'], + 'amount' => round($this->auth_request['AMOUNT'] * 100), + 'currency' => $this->auth_request['CURRENCY'], 'description' => $this->auth_request['DESCRIPTION'] ); @@ -315,11 +315,11 @@ if ($charge->paid) { return array( - 'ID' => $charge->id, - 'AMOUNT' => round($charge->amount / 100, 2), - 'CURRENCY' => strtoupper($charge->currency), + 'ID' => $charge->id, + 'AMOUNT' => round($charge->amount / 100, 2), + 'CURRENCY' => strtoupper($charge->currency), 'TIMESTAMP' => $charge->created, - 'CARDREF' => $this->cardref, + 'CARDREF' => $this->cardref, ); } else { @@ -329,8 +329,8 @@ catch(\Stripe_Error $e) { Log::error('Stripe API Error', array( 'request' => $request, - 'status' => $e->getHttpStatus(), - 'body' => $e->getHttpBody(), + 'status' => $e->getHttpStatus(), + 'body' => $e->getHttpBody(), )); $this->set_error($e->getCode()); $this->error_message = $e->getMessage(); @@ -358,5 +358,4 @@ { return $this->error_message ?: parent::get_error_message(); } - -} \ No newline at end of file +}
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.