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)
This commit is contained in:
Filipp Gunbin 2022-10-20 20:41:00 +03:00
parent 1324baea72
commit 937ae0cf55

View 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))