From: Filipp Gunbin Date: Thu, 20 Oct 2022 17:41:00 +0000 (+0300) Subject: Fix ldapsearch output parsing in ldap-search-internal X-Git-Tag: emacs-29.0.90~1616^2~518 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=937ae0cf55d31c332fba3d96061e2ac3653e5437;p=emacs.git Fix ldapsearch output parsing in ldap-search-internal * lisp/net/ldap.el (ldap-search-internal): When parsing output, make sure that file:// matched before opening the file. (bug#58605) --- diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 062ff05d69c..ccad8c4edb1 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -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))