From 3e23f03e016611fbb77e51e1ddd7e1e0327f5b2c Mon Sep 17 00:00:00 2001 From: SteScho Date: Thu, 30 Jan 2014 09:31:00 +0100 Subject: Update auth.php In Novell eDir the group search returns strings, not arrays. Added if-statement which determines if the result is an array or an string. --- lib/plugins/authldap/auth.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 31e2c5135..d9d4b3d20 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -143,6 +143,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Dan Allen * @author * @author Stephane Chazelas + * @author Steffen Schoch * * @param string $user * @param bool $inbind authldap specific, true if in bind phase @@ -241,8 +242,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { if(is_array($result)) foreach($result as $grp) { if(!empty($grp[$this->getConf('groupkey')][0])) { - $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__); - $info['grps'][] = $grp[$this->getConf('groupkey')][0]; + if(is_array($grp[$this->getConf('groupkey')][0])) { + $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__); + $info['grps'][] = $grp[$this->getConf('groupkey')][0]; + } else { + $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')]), 0, __LINE__, __FILE__); + $info['grps'][] = $grp[$this->getConf('groupkey')]; + } } } } -- cgit v1.2.3 From 38e97ed02731b8126aff3d921ad82e72212129a2 Mon Sep 17 00:00:00 2001 From: SteScho Date: Mon, 3 Feb 2014 07:39:16 +0100 Subject: Update auth.php As suggested by @selfthinker --- lib/plugins/authldap/auth.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index d9d4b3d20..98858cb40 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -242,13 +242,9 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { if(is_array($result)) foreach($result as $grp) { if(!empty($grp[$this->getConf('groupkey')][0])) { - if(is_array($grp[$this->getConf('groupkey')][0])) { - $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__); - $info['grps'][] = $grp[$this->getConf('groupkey')][0]; - } else { - $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')]), 0, __LINE__, __FILE__); - $info['grps'][] = $grp[$this->getConf('groupkey')]; - } + $groupkey = (is_array($grp[$this->getConf('groupkey')][0])) ? $grp[$this->getConf('groupkey')][0] : $grp[$this->getConf('groupkey')]; + $this->_debug('LDAP usergroup: '.htmlspecialchars($groupkey), 0, __LINE__, __FILE__); + $info['grps'][] = $groupkey; } } } -- cgit v1.2.3 From 3402a2df526d2f8e344fefabb895bfa7de27ef32 Mon Sep 17 00:00:00 2001 From: matej Date: Tue, 4 Feb 2014 13:31:10 +0100 Subject: translation update --- lib/plugins/authldap/lang/sl/settings.php | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/plugins/authldap/lang/sl/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/sl/settings.php b/lib/plugins/authldap/lang/sl/settings.php new file mode 100644 index 000000000..f180226fc --- /dev/null +++ b/lib/plugins/authldap/lang/sl/settings.php @@ -0,0 +1,8 @@ + + */ +$lang['starttls'] = 'Ali naj se uporabijo povezave TLS?'; -- cgit v1.2.3 From 9f72d639a21d95cbc5fb211dc4e9bc0584efb0c5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Feb 2014 09:49:55 +0100 Subject: authldap: handle bad groupkey gracefully --- lib/plugins/authldap/auth.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 98858cb40..94f3be8d2 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -241,10 +241,17 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { ldap_free_result($sr); if(is_array($result)) foreach($result as $grp) { - if(!empty($grp[$this->getConf('groupkey')][0])) { - $groupkey = (is_array($grp[$this->getConf('groupkey')][0])) ? $grp[$this->getConf('groupkey')][0] : $grp[$this->getConf('groupkey')]; - $this->_debug('LDAP usergroup: '.htmlspecialchars($groupkey), 0, __LINE__, __FILE__); - $info['grps'][] = $groupkey; + if(!empty($grp[$this->getConf('groupkey')])) { + $group = $grp[$this->getConf('groupkey')]; + if(is_array($group)){ + $group = $group[0]; + } else { + $this->_debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__); + } + if($group === '') continue; + + $this->_debug('LDAP usergroup: '.htmlspecialchars($group), 0, __LINE__, __FILE__); + $info['grps'][] = $group; } } } -- cgit v1.2.3 From 9a2c73e86d2549a2cd63d7f772b4bb1a3956e46f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 12:36:15 +0100 Subject: streamlined retrieveUsers() signature over all auth plugins FS#2919 --- lib/plugins/authldap/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 94f3be8d2..6c3637e15 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -281,7 +281,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @param array $filter array of field/pattern pairs, null for no filter * @return array of userinfo (refer getUserData for internal userinfo details) */ - function retrieveUsers($start = 0, $limit = -1, $filter = array()) { + function retrieveUsers($start = 0, $limit = 0, $filter = array()) { if(!$this->_openLDAP()) return false; if(is_null($this->users)) { @@ -316,7 +316,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } if($this->_filter($user, $info)) { $result[$user] = $info; - if(($limit >= 0) && (++$count >= $limit)) break; + if(($limit > 0) && (++$count >= $limit)) break; } } return $result; -- cgit v1.2.3 From 948d482d02c7bfd8a6b00e1339e7e2300acde137 Mon Sep 17 00:00:00 2001 From: Marina Vladi Date: Sat, 22 Feb 2014 12:51:41 +0100 Subject: translation update --- lib/plugins/authldap/lang/hu/settings.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/hu/settings.php b/lib/plugins/authldap/lang/hu/settings.php index 041f82755..1e6608dab 100644 --- a/lib/plugins/authldap/lang/hu/settings.php +++ b/lib/plugins/authldap/lang/hu/settings.php @@ -4,9 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Marton Sebok + * @author Marina Vladi */ -$lang['server'] = 'LDAP-szerver. Hosztnév (localhost) vagy abszolút URL portszámmal (ldap://server.tld:389)'; -$lang['port'] = 'LDAP-szerver port, ha nem URL lett megadva'; +$lang['server'] = 'LDAP-szerver. Kiszolgálónév (localhost) vagy teljes URL-cím (ldap://server.tld:389)'; +$lang['port'] = 'LDAP-kiszolgáló portja, ha URL-cím nem lett megadva'; $lang['usertree'] = 'Hol találom a felhasználókat? Pl. ou=People, dc=server, dc=tld'; $lang['grouptree'] = 'Hol találom a csoportokat? Pl. ou=Group, dc=server, dc=tld'; $lang['userfilter'] = 'LDAP szűrő a felhasználók kereséséhez, pl. (&(uid=%{user})(objectClass=posixAccount))'; @@ -20,7 +21,7 @@ $lang['bindpw'] = 'Ehhez tartozó jelszó.'; $lang['userscope'] = 'A keresési tartomány korlátozása erre a felhasználókra való keresésnél'; $lang['groupscope'] = 'A keresési tartomány korlátozása erre a csoportokra való keresésnél'; $lang['groupkey'] = 'Csoport meghatározása a következő attribútumból (az alapértelmezett AD csoporttagság helyett), pl. a szervezeti egység vagy a telefonszám'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; +$lang['debug'] = 'Továbi hibakeresési információk megjelenítése hiba esetén'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; -- cgit v1.2.3 From 6bc2d8e51371c2ee17233d4c76112e3fefca437f Mon Sep 17 00:00:00 2001 From: Aleksandr Selivanov Date: Sat, 8 Mar 2014 13:05:57 +0100 Subject: translation update --- lib/plugins/authldap/lang/ru/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 2b93e0fd4..fbe75d3cb 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -6,6 +6,8 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov * @author Erli Moen + * @author Aleksandr Selivanov */ $lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['bindpw'] = 'Пароль для указанного пользователя.'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; -- cgit v1.2.3 From 3b7b1e523ecf0c4752f428e6c5f530988e0b80b9 Mon Sep 17 00:00:00 2001 From: Aleksandr Selivanov Date: Sun, 9 Mar 2014 15:31:27 +0100 Subject: translation update --- lib/plugins/authldap/lang/ru/settings.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index fbe75d3cb..04a3ee784 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -11,3 +11,6 @@ $lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['bindpw'] = 'Пароль для указанного пользователя.'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; -- cgit v1.2.3