Projet

Général

Profil

Anomalie #20175

Recherche par DisplayName

Ajouté par Christophe LEON il y a environ 7 ans. Mis à jour il y a presque 7 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
12/04/2017
Echéance:
% réalisé:

100%

Distribution:

Description

La recherche par displayName au delà de l'espace ne fonctionne pas

Par exemple pour rechercher : jean DUPOND

Fonctionne bien jusqu'au jean
N'affiche plus rien a 'jean D'

Révisions associées

Révision 9d69968a (diff)
Ajouté par Christophe LEON il y a environ 7 ans

fixes #20175: recherche LDAP par displayName contenant un espace

Historique

#1 Mis à jour par Christophe LEON il y a environ 7 ans

La recherche 'jean D' est transcrite comme ceci

(&(&(objectclass=ENTPerson))(displayName=*)(&(|(uid=jean*)(displayName=jean*)(mail=jean*))(|(uid=b*)(displayName=b*)(mail=b*))))

Méthode incriminée

apps/user_ldap/lib/access.php:getAdvancedFilterPartForSearch

Code problématique

$searchWords = explode(' ', trim($search));

La lib owncloud ne prévoit donc pas de chercher sur des attributs avec un espace, on retrouve en commentaire dans le code
"//every word needs to appear at least once"

en remplaçant le code par $searchWords=[trim($search)]; la recherche par displayName est OK

que faire ?

#2 Mis à jour par Christophe LEON il y a environ 7 ans

  • Statut changé de En cours à Résolu
  • % réalisé changé de 0 à 100

#3 Mis à jour par Arnaud FORNEROT il y a environ 7 ans

  • Version cible mis à Envole 5.5

#4 Mis à jour par Arnaud FORNEROT il y a presque 7 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF