From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David =?UTF-8?Q?Sp=C3=A5ngberg?= Newsgroups: gmane.emacs.bugs Subject: bug#18842: 24.4; gnus not handling passwords with double quotes in .authinfo Date: Sun, 26 Oct 2014 12:54:29 +0100 Message-ID: <87ioj7avwq.fsf@laptop.roflmf> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414332868 13137 80.91.229.3 (26 Oct 2014 14:14:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2014 14:14:28 +0000 (UTC) To: 18842@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 26 15:14:22 2014 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 1XiOaL-0005WS-2M for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 15:14:21 +0100 Original-Received: from localhost ([::1]:56822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOaK-0001NL-LJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 10:14:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOaB-0001NA-Ux for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:14:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiOa4-00059h-0b for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:14:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOa3-00059a-T2 for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XiOa3-0003Oh-6O for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:14:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David =?UTF-8?Q?Sp=C3=A5ngberg?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Oct 2014 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18842 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.141433282013018 (code B ref -1); Sun, 26 Oct 2014 14:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2014 14:13:40 +0000 Original-Received: from localhost ([127.0.0.1]:36057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiOZf-0003Nt-9D for submit@debbugs.gnu.org; Sun, 26 Oct 2014 10:13:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42915) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiMPO-00005E-VO for submit@debbugs.gnu.org; Sun, 26 Oct 2014 07:54:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiMPD-0007zP-Bs for submit@debbugs.gnu.org; Sun, 26 Oct 2014 07:54:49 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiMPD-0007zJ-8h for submit@debbugs.gnu.org; Sun, 26 Oct 2014 07:54:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiMP7-00049t-JI for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 07:54:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiMP1-0007yv-UC for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 07:54:37 -0400 Original-Received: from tunna.org ([91.205.62.186]:33199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiMP1-0007xw-KQ for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 07:54:31 -0400 Original-Received: from laptop.roflmf (unknown [83.254.7.91]) by tunna.org (Postfix) with ESMTPSA id CFB0A47D12 for ; Sun, 26 Oct 2014 12:54:29 +0100 (CET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sun, 26 Oct 2014 10:13:38 -0400 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:95099 Hi After a recent update of emacs gnus fails to connect to a mail server with login information listed in one of the "~/.authinfo" or "~/.authinfo.gpg" files. The password in the file is quoted and contains an escaped double quote. Something like this: machine example.org login testuser password "test\"password" port 12345 gnus fails with the following messages displayed in the *messages* buffer: auth-source-netrc-parse-entries: Unexpected 'machine' token at line 2 nnimap (example) open error: 'NO (AUTHENTICATIONFAILED) Authentication failed.'. Continue? (y or n) n The problem seems to be a faulty regexp in `auth-source-netrc-parse-one'. The following code run from a clean emacs 24.4 session shows the problem: (require 'auth-source) ;; The following should return "test\"password" but instead returns ;; "test\\" (with-temp-buffer (insert "\"test\\\"password\"\n") (goto-char (point-min)) (auth-source-netrc-parse-one)) The faulty regexp in `auth-source-netrc-parse-one' I am referring to is the following: ... (looking-at "\"\\([^\"]*\\)\"") ... My current workaround is to redefine `auth-source-netrc-parse-one' in my init file like this: (defun auth-source-netrc-parse-one () "Read one thing from the current buffer." (auth-source-netrc-parse-next-interesting) (unless (eobp) (let ((matched (if (= (following-char) ?\") (read (current-buffer)) (buffer-substring (point) (progn (skip-chars-forward "^\t\n ") (point)))))) (auth-source-netrc-parse-next-interesting) matched))) This definition is based on some code in `netrc-parse' from "net/netrc.el" (maybe it is possible to use this function in gnus instead?). Best regards, David In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3) of 2014-10-21 on bitzer.hoetzel.info Windowing system distributor `The X.Org Foundation', version 11.0.11601000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_MESSAGES: C value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-e C-x C-e C-n C-n C-M-x M-x r e p o r t G N U g n u s SPC n o t SPC h a n d l i n g SPC d o u b l e SPC q u o t e s SPC i n SPC q u o t e d SPC p a s s w o r d SPC s t r i n g e s s C-a C-e C-n C-n C-n C-n C-n C-n C-l C-n C-l C-n C-l C-n C-l C-p C-p C-p C-p C-p C-p C-p C-p C-l C-p C-l C-p C-l C-p C-l C-n C-n C-n C-n C-n C-n C-n C-n C-l C-x k y e s C-g C-g C-x k y e s M-x M-p Recent messages: Checking 70 files in /usr/share/emacs/24.4/lisp/erc... Checking 48 files in /usr/share/emacs/24.4/lisp/emulation... Checking 151 files in /usr/share/emacs/24.4/lisp/emacs-lisp... Checking 24 files in /usr/share/emacs/24.4/lisp/cedet... Checking 57 files in /usr/share/emacs/24.4/lisp/calendar... Checking 87 files in /usr/share/emacs/24.4/lisp/calc... Checking 95 files in /usr/share/emacs/24.4/lisp/obsolete... Checking for load-path shadows...done byte-code: Beginning of buffer [3 times] Auto-saving...done Quit [2 times] Load-path shadows: None found. Features: (help-mode pp shadow sort mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util help-fns mail-prsvr password-cache time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 82211 11023) (symbols 48 18873 0) (miscs 40 46 233) (strings 32 12611 4005) (string-bytes 1 356631) (vectors 16 11040) (vector-slots 8 403091 11662) (floats 8 69 402) (intervals 56 283 24) (buffers 960 14) (heap 1024 51340 1029))