summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorFilipp Gunbin <fgunbin@fastmail.fm>2022-10-20 20:41:00 +0300
committerFilipp Gunbin <fgunbin@fastmail.fm>2022-10-20 20:52:11 +0300
commit937ae0cf55d31c332fba3d96061e2ac3653e5437 (patch)
treed77943086f3155583ae1cc8aeae3d1f7c0d346f6 /lisp/net
parent1324baea728a11bf650303698881c682105155da (diff)
downloademacs-937ae0cf55d31c332fba3d96061e2ac3653e5437.tar.gz
emacs-937ae0cf55d31c332fba3d96061e2ac3653e5437.tar.bz2
emacs-937ae0cf55d31c332fba3d96061e2ac3653e5437.zip
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)
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ldap.el8
1 files changed, 4 insertions, 4 deletions
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))