From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: bug#12511: 24.1; parse-netrc does not properly handle newlines Date: Sat, 15 Jun 2013 04:18:57 -0400 Organization: =?UTF-8?Q?=D0=A2=D0=B5=D0=BE=D0=B4=D0=BE=D1=80_?= =?UTF-8?Q?=D0=97=D0=BB=D0=B0=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= @ Cienfuegos Message-ID: References: <87r4pq20ev.wl%egh@e6h.org> <87lifwalk2.wl%egh@e6h.org> Reply-To: bug-gnu-emacs@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1371284412 32047 80.91.229.3 (15 Jun 2013 08:20:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Jun 2013 08:20:12 +0000 (UTC) To: 12511@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 15 10:20:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UnliS-0001Xw-Oj for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jun 2013 10:20:08 +0200 Original-Received: from localhost ([::1]:35946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnliS-0005Xe-9l for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jun 2013 04:20:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnliO-0005Vp-1W for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:20:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnliM-0001nQ-S3 for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:20:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnliM-0001n8-Nr for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UnliL-0005px-Nj for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:20:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r4pq20ev.wl%egh@e6h.org> Resent-From: Ted Zlatanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jun 2013 08:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12511 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137128436422317 (code B ref -1); Sat, 15 Jun 2013 08:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jun 2013 08:19:24 +0000 Original-Received: from localhost ([127.0.0.1]:45563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Unlhi-0005ne-RU for submit@debbugs.gnu.org; Sat, 15 Jun 2013 04:19:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38691) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Unlhf-0005me-Uk for submit@debbugs.gnu.org; Sat, 15 Jun 2013 04:19:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnlhZ-0001c4-VF for submit@debbugs.gnu.org; Sat, 15 Jun 2013 04:19:14 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnlhZ-0001c0-SD for submit@debbugs.gnu.org; Sat, 15 Jun 2013 04:19:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnlhX-0005Pu-Sv for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:19:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnlhW-0001bV-LG for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:19:11 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnlhW-0001bN-FC for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 04:19:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UnlhU-0000sl-KB for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 10:19:08 +0200 Original-Received: from 11.79-161-196.customer.lyse.net ([79.161.196.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Jun 2013 10:19:08 +0200 Original-Received: from tzz by 11.79-161-196.customer.lyse.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Jun 2013 10:19:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 11.79-161-196.customer.lyse.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (darwin) Cancel-Lock: sha1:B3pmgzMRU8twhWwOen6bnTnYgD0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75139 Archived-At: On Wed, 26 Sep 2012 07:46:53 -0700 Erik Hetzner wrote: EH> At Tue, 25 Sep 2012 18:12:27 -0400, EH> Glenn Morris wrote: >> >> Just to comment that there is also ange-ftp-parse-netrc, which looks >> like it might handle newlines. I don't know why Emacs needs this and >> also netrc-parse (and also tramp-parse-netrc). Sorry for the late reply. Basically, the answer is "cruft." `ange-ftp-parse-netrc' is a very different beast from the auth-source netrc parser. It mixes file handling, security checks, and other functionality with the actual parsing. It doesn't handle queries on the parsed contents, limiting the number of matches, or enclosing the password token in a closure so it's not visible when printed (this is an auth-source feature: all passwords it returns are thus enclosed). The original auth-source netrc parser came from Gnus' netrc.el parser but also got the features above and more. Gnus used to be a standalone package that had to work with Emacs and XEmacs so I assume it needed a standalone reliable netrc parser... Perhaps `tramp-parse-netrc' was motivated similarly. I didn't remove netrc.el because other packages may use it and may even depend on its particular parsing behavior. But Gnus doesn't, AFAIK. EH> And, in fact, it seems my problem with auth-source-netrc-parse, which EH> url.el uses. EH> So: netrc-parse, tramp-parse-netrc, and auth-source-netrc-parse all do EH> not handle linefeeds in ~/.netrc files. EH> ange-ftp-parse-netrc, on the other hand, does. EH> For what it’s worth, I didn’t create a ~/.netrc file myself with EH> linefeeds; it was created for me by other software. I've comitted a new version of the auth-source netrc parser to the Gnus repo (it will be synchronized to Emacs later) that can handle single-quoted strings and multiline entries. Basically what "man netrc" says it should, except for "macdef" which I have never seen in the wild. I've tested the code but please let me know if it works for you. Ted