From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#20910: 24.4; *shell* write the password in clear in the buffer on git push Date: Thu, 07 Nov 2019 01:49:47 +0100 Message-ID: <87mud8wlw4.fsf@marxist.se> References: <87mvzlr55n.fsf@xload.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="79535"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 20910-done@debbugs.gnu.org, aurelien , Stefan Monnier To: Marcin Borkowski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 07 01:50:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSW03-000KWr-Ht for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 01:50:11 +0100 Original-Received: from localhost ([::1]:38124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSW02-0005xF-Dc for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 19:50:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSVzv-0005wt-U4 for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 19:50:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSVzu-0004QY-Lo for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 19:50:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSVzu-0004QM-En for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 19:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSVzu-0008Km-Al for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 19:50:02 -0500 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 00:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20910 X-GNU-PR-Package: emacs Mail-Followup-To: 20910@debbugs.gnu.org, stefan@marxist.se, aurelien@hackers.camp Original-Received: via spool by 20910-done@debbugs.gnu.org id=D20910.157308780032020 (code D ref 20910); Thu, 07 Nov 2019 00:50:02 +0000 Original-Received: (at 20910-done) by debbugs.gnu.org; 7 Nov 2019 00:50:00 +0000 Original-Received: from localhost ([127.0.0.1]:41468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSVzr-0008KN-QO for submit@debbugs.gnu.org; Wed, 06 Nov 2019 19:50:00 -0500 Original-Received: from host.gofardesign.uk ([208.79.239.190]:45700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSVzp-0008K6-Me for 20910-done@debbugs.gnu.org; Wed, 06 Nov 2019 19:49:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nGWRXrygKTLhnzLYIxWgQocc6SZcWMo1RpNuzhrSmXo=; b=Jyb4uiEZfFygAQnpT4YTvxeut9 BleElYUUpwvVNrzqjy3tR0qpDa+BmZ3XqCIO5fakaozImUYPtPBxrm8mRFYBwzjX0Yd2JnPQ1k/lg W/eqkWE28DR6QWqbMMm6m2uDKDezxuj4+hePcYquRLzhulMBSj0Xv6+ewIfvibjinb5Q=; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:49100 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iSVzg-0007t4-Vw; Wed, 06 Nov 2019 18:49:50 -0600 In-Reply-To: (Stefan Kangas's message of "Sun, 6 Oct 2019 03:46:06 +0200") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:171060 Archived-At: Stefan Kangas writes: >>>> M-x shell >>>> git add mysupersoftware.py >>>> git commit -m "pay attention of the pep8 thanks M-x py-pep8-run" >>>> git push >>>> shell $ request for the password of the git, and print it in clear in >>>> the buffer >>> >>> Can you show us the actual password prompt (which is the only info that >>> Emacs gets that a password is being requested, so it needs to recognize >>> it, and those prompts change with language settings and stuff, so it's >>> very heuristic and messy). >> >> I suspect that this might depend on Git version and configuration, and >> things like gpg-agent. In my case, it displayed a window (in WM sense, >> not in Emacs sense) asking for password, and only after clicking >> "Cancel", it asked within Emacs. The prompt was: >> >> Password for 'https://mbork@github.com': >> >> and indeed the characters of the password were visible. >> >>> Stefan >> >> Best, > > Hi Marcin, > > When I try the following on Emacs 26.1, I get no error: > > (progn > (require 'comint) > (or > (string-match comint-password-prompt-regexp > "Password for 'https://foo@example.org: ") > (error "NO MATCH"))) > > This suggests to me that a prompt such as the above should work under > M-x shell, since that is built on top of comint. > > Could you verify that this works for you on Emacs 26.1 or later? More information was requested, but none was given within 4 weeks. I went ahead and added a string to test for the above to the test suite in commit 1428dfe630, and with that I'm closing this bug. Best regards, Stefan Kangas