Projects
Kolab:3.4
kolab-webadmin
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 24
View file
kolab-webadmin.spec
Changed
@@ -35,7 +35,7 @@ Name: kolab-webadmin Version: 3.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Kolab Groupware Server Web Administration Interface License: AGPLv3+ Group: Productivity/Office/Organizers @@ -43,6 +43,9 @@ Source0: http://mirror.kolabsys.com/pub/releases/kolab-webadmin-%{version}.tar.gz +Patch0001: 0001-Fix-lost-object_type-in-validate-arguments.patch +Patch0002: 0002-Fix-so-exception-is-thrown-on-alias-addresses-valida.patch + BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,6 +71,9 @@ %prep %setup -q +%patch0001 -p1 +%patch0002 -p1 + for file in `find . -type f -name "*.enterprise"`; do if [ 0%{?kolab_enterprise} -gt 0 ]; then mv -v $file $(echo $file | sed -e 's/.enterprise$//g') @@ -153,6 +159,10 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Wed Nov 27 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.3-2 +- Fix #2596, which incidentally allowed the primary address to be + defined as a secondary address. + * Sun Nov 24 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.3-1 - New upstream version
View file
0001-Fix-lost-object_type-in-validate-arguments.patch
Added
@@ -0,0 +1,24 @@ +From 56a5b6d36535025933270842a3aa80f16d67c0ee Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <alec@alec.pl> +Date: Tue, 26 Nov 2013 19:43:17 +0100 +Subject: [PATCH 1/2] Fix lost object_type in validate() arguments + +--- + lib/kolab_api_service.php | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php +index 1972cb0..4e5a029 100644 +--- a/lib/kolab_api_service.php ++++ b/lib/kolab_api_service.php +@@ -284,6 +284,7 @@ abstract class kolab_api_service + $form_service = $this->controller->get_service('form_value'); + + // With the result, start validating the input ++ $attribs['object_type'] = $object_name; + $validate_result = $form_service->validate(null, $attribs); + + $special_attr_validate = Array(); +-- +1.8.3.1 +
View file
0002-Fix-so-exception-is-thrown-on-alias-addresses-valida.patch
Added
@@ -0,0 +1,77 @@ +From e6f1a694efe87e39606580cdf6235110b6395dbe Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <alec@alec.pl> +Date: Wed, 27 Nov 2013 09:20:31 +0100 +Subject: [PATCH 2/2] Fix so exception is thrown on alias addresses validation + when one of validated addresses is a primary mail (Bug #2596) + +--- + lib/Auth/LDAP.php | 2 ++ + lib/api/kolab_api_service_form_value.php | 25 +++++++++++++++++++++---- + 2 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php +index bf02ba1..7de9017 100644 +--- a/lib/Auth/LDAP.php ++++ b/lib/Auth/LDAP.php +@@ -605,6 +605,8 @@ class LDAP extends Net_LDAP3 { + ); + } + ++ $this->config_set('return_attributes', $mail_attrs); ++ + $result = $this->search_entries($this->config_get('root_dn'), '(objectclass=*)', 'sub', null, $search); + + if ($result && $result->count() > 0) { +diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php +index 3ea1670..1d47a9c 100644 +--- a/lib/api/kolab_api_service_form_value.php ++++ b/lib/api/kolab_api_service_form_value.php +@@ -1070,7 +1070,7 @@ class kolab_api_service_form_value extends kolab_api_service + * Checks if specified list of email addresses is already + * in use by another user + */ +- private function _email_addresses_in_use($addresses, $postdata) ++ private function _email_addresses_in_use($addresses, $attr_name, $postdata) + { + $auth = Auth::get_instance(); + +@@ -1083,8 +1083,25 @@ class kolab_api_service_form_value extends kolab_api_service + $user_found_unique_attr = $this->unique_attribute_value($user_found_dn); + + if ($user_found_unique_attr == $postdata['id']) { +- Log::trace(__FUNCTION__ . ": Entry with address $addr is actually us."); +- continue; ++ // check if the address is in another field, we prevent here ++ // from e.g. adding primary mail address into aliases list ++ $found = false; ++ $user = $users[$user_found_dn]; ++ unset($user[$attr_name]); ++ ++ foreach ($user as $attr => $list) { ++ if (in_array($addr, (array) $list)) { ++ $found = true; ++ break; ++ } ++ } ++ ++ if (!$found) { ++ Log::trace(__FUNCTION__ . ": Entry with address $addr is actually us."); ++ continue; ++ } ++ ++ // @TODO: throw different exception? + } + } + +@@ -1121,7 +1138,7 @@ class kolab_api_service_form_value extends kolab_api_service + + // Check if addresses are not already in use + if ($validation_type == self::VALIDATE_EXTENDED) { +- $this->_email_addresses_in_use($value, $postdata); ++ $this->_email_addresses_in_use($value, 'alias', $postdata); + } + + return 'OK'; +-- +1.8.3.1 +
View file
debian.changelog
Changed
@@ -1,3 +1,10 @@ +kolab-webadmin (3.1.3-0~kolab2) unstable; urgency=low + + * Fix #2596, which incidentally allowed the primary address to be + defined as a secondary address. + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 27 Nov 2013 22:08:00 +0100 + kolab-webadmin (3.1.3-0~kolab1) unstable; urgency=low * New upstream version
View file
debian.series
Changed
@@ -0,0 +1,2 @@ +0001-Fix-lost-object_type-in-validate-arguments.patch -p1 +0002-Fix-so-exception-is-thrown-on-alias-addresses-valida.patch -p1
View file
kolab-webadmin.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-webadmin Binary: kolab-webadmin Architecture: all -Version: 3.1.3-0~kolab1 +Version: 3.1.3-0~kolab2 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/
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
.