From e961d4f595e0e9e5126d7a590798f34b4e1f4e23 Mon Sep 17 00:00:00 2001 From: interp Date: Thu, 4 Apr 2002 22:39:15 +0000 Subject: [PATCH] Try not to loose on empty / wrong lines in .netrc (Skip them silently instead until we have a error checking system on netrc files.) --- netrc.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/netrc.scm b/netrc.scm index e1adc43..e5e03b0 100644 --- a/netrc.scm +++ b/netrc.scm @@ -1,6 +1,6 @@ ;;; netrc.scm -- parse authentication information contained in ~/.netrc ;; -;; $Id: netrc.scm,v 1.5 2002/02/12 11:47:53 interp Exp $ +;; $Id: netrc.scm,v 1.6 2002/04/04 22:39:15 interp Exp $ ;; ;; Please send suggestions and bug reports to @@ -330,7 +330,11 @@ (password (try-match "password[ \t]+([^ \t]+)" line)) (account (try-match "account[ \t]+([^ \t]+)" line))) (if (or machine login password account) - (add netrc-record machine login password account))))))) + (add netrc-record machine login password account) + netrc-record)))))) ; return record on empty / wrong lines +; (This is a workaround. we should give a warning on malicious .netrc +; files. As we do not have an error checking system installed yet, we +; skip these lines silently.) ; adds machine login password account stored in a netrc-entry-record ; to the entries-list of a netrc-record