summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authormbi <knox@users.noreply.github.com>2015-12-08 21:02:52 +0100
committermbi <knox@users.noreply.github.com>2015-12-08 21:02:52 +0100
commit508c46a112d3d53b4b0668efcbe1403eb2e143b8 (patch)
tree29ef86459abae1dcaadf75203851ab9b39ec43bd /apps/user_ldap
parent27f420e0a797f8a56b5e83e8dd8e19df289c766b (diff)
parent13993c4a6db83c0a637fc7c20da0470acae47208 (diff)
downloadnextcloud-server-508c46a112d3d53b4b0668efcbe1403eb2e143b8.tar.gz
nextcloud-server-508c46a112d3d53b4b0668efcbe1403eb2e143b8.zip
Merge branch 'master' into master
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/ajax/testConfiguration.php2
-rw-r--r--apps/user_ldap/l10n/lt_LT.js2
-rw-r--r--apps/user_ldap/l10n/lt_LT.json2
-rw-r--r--apps/user_ldap/lib/access.php2
-rw-r--r--apps/user_ldap/user_ldap.php2
5 files changed, 7 insertions, 3 deletions
diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php
index f5fd5f23b87..47fc776983a 100644
--- a/apps/user_ldap/ajax/testConfiguration.php
+++ b/apps/user_ldap/ajax/testConfiguration.php
@@ -49,7 +49,7 @@ try {
* pass (like e.g. expected syntax error).
*/
try {
- $ldapWrapper->read($connection->getConnectionResource(), 'neverwhere', 'objectClass=*', array('dn'));
+ $ldapWrapper->read($connection->getConnectionResource(), '', 'objectClass=*', array('dn'));
} catch (\Exception $e) {
if($e->getCode() === 1) {
OCP\JSON::error(array('message' => $l->t('The configuration is invalid: anonymous bind is not allowed.')));
diff --git a/apps/user_ldap/l10n/lt_LT.js b/apps/user_ldap/l10n/lt_LT.js
index e27dcc3e8de..c263e952206 100644
--- a/apps/user_ldap/l10n/lt_LT.js
+++ b/apps/user_ldap/l10n/lt_LT.js
@@ -4,7 +4,9 @@ OC.L10N.register(
"Failed to clear the mappings." : "Nepavyko išvalyti sąsajų.",
"Failed to delete the server configuration" : "Nepavyko pašalinti serverio konfigūracijos",
"The configuration is valid and the connection could be established!" : "Konfigūracija yra tinkama bei prisijungta sėkmingai!",
+ "The configuration is invalid. Please have a look at the logs for further details." : "Neteisinga konfigūracija. Daugiau informacijos rasite žurnaluose.",
"No action specified" : "Nepasirinktas veiksmas",
+ "No data specified" : "Nepateikta duomenų",
"Select groups" : "Pasirinkti grupes",
"Do you really want to delete the current Server Configuration?" : "Ar tikrai norite ištrinti dabartinę serverio konfigūraciją?",
"Confirm Deletion" : "Patvirtinkite trynimą",
diff --git a/apps/user_ldap/l10n/lt_LT.json b/apps/user_ldap/l10n/lt_LT.json
index fa1526c0632..64e2bae4670 100644
--- a/apps/user_ldap/l10n/lt_LT.json
+++ b/apps/user_ldap/l10n/lt_LT.json
@@ -2,7 +2,9 @@
"Failed to clear the mappings." : "Nepavyko išvalyti sąsajų.",
"Failed to delete the server configuration" : "Nepavyko pašalinti serverio konfigūracijos",
"The configuration is valid and the connection could be established!" : "Konfigūracija yra tinkama bei prisijungta sėkmingai!",
+ "The configuration is invalid. Please have a look at the logs for further details." : "Neteisinga konfigūracija. Daugiau informacijos rasite žurnaluose.",
"No action specified" : "Nepasirinktas veiksmas",
+ "No data specified" : "Nepateikta duomenų",
"Select groups" : "Pasirinkti grupes",
"Do you really want to delete the current Server Configuration?" : "Ar tikrai norite ištrinti dabartinę serverio konfigūraciją?",
"Confirm Deletion" : "Patvirtinkite trynimą",
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 42e57e8296e..667f1076235 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -177,7 +177,7 @@ class Access extends LDAPUtility implements user\IUserTools {
//in case an error occurs , e.g. object does not exist
return false;
}
- if (empty($attr)) {
+ if (empty($attr) && ($filter === 'objectclass=*' || $this->ldap->countEntries($cr, $rr) === 1)) {
\OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG);
return array();
}
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index fc8ce361637..0097dda89b5 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -204,7 +204,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
$dn = $user->getDN();
//check if user really still exists by reading its entry
- if(!is_array($this->access->readAttribute($dn, ''))) {
+ if(!is_array($this->access->readAttribute($dn, '', $this->access->connection->ldapUserFilter))) {
$lcr = $this->access->connection->getConnectionResource();
if(is_null($lcr)) {
throw new \Exception('No LDAP Connection to server ' . $this->access->connection->ldapHost);