]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ldapsearch output parsing in ldap-search-internal
authorFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 20 Oct 2022 17:41:00 +0000 (20:41 +0300)
committerFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 20 Oct 2022 17:52:11 +0000 (20:52 +0300)
* lisp/net/ldap.el (ldap-search-internal): When parsing output, make
sure that file:// matched before opening the file. (bug#58605)

lisp/net/ldap.el

index 062ff05d69c1815deb24a24ba9a6d7dc249f4dfd..ccad8c4edb118b3daf90d0a3215de832f06c908c 100644 (file)
@@ -715,14 +715,14 @@ an alist of attribute/value pairs."
                      (eq (string-match "/\\(.:.*\\)$" value) 0))
                 (setq value (match-string 1 value)))
            ;; Do not try to open non-existent files
-           (if (equal value "")
-               (setq value " ")
-             (with-current-buffer bufval
+            (if (match-string 3)
+              (with-current-buffer bufval
                (erase-buffer)
                (set-buffer-multibyte nil)
                (insert-file-contents-literally value)
                (delete-file value)
-               (setq value (buffer-string))))
+               (setq value (buffer-string)))
+              (setq value " "))
            (setq record (cons (list name value)
                               record))
            (forward-line 1))