From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working Date: Sun, 4 Aug 2019 11:44:27 +0200 Message-ID: <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="171044"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org To: Daniel =?UTF-8?Q?Ekl=C3=B6f?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 04 11:45:11 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 1huD4g-000iMq-6a for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 11:45:10 +0200 Original-Received: from localhost ([::1]:43346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huD4e-0002H5-JL for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 05:45:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52744) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huD4Z-0002Gx-NU for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 05:45:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1huD4Y-0004C8-Lg for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 05:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1huD4Y-0004Bu-Co for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 05:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1huD4Y-0005Hk-8g for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 05:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2019 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36879 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36879-submit@debbugs.gnu.org id=B36879.156491187820267 (code B ref 36879); Sun, 04 Aug 2019 09:45:02 +0000 Original-Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 09:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:60439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD49-0005Gp-UJ for submit@debbugs.gnu.org; Sun, 04 Aug 2019 05:44:38 -0400 Original-Received: from mail156c50.megamailservers.eu ([91.136.10.166]:56154 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD48-0005Gg-0H for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 05:44:37 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564911874; bh=Cp7Pa8ap+aj5g6rQX0Do+eEUxjwpXgok2XHPExcxtr4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Gvc3QcKciLtDlkjX2KsMNOOTxv4vCOxLeOEEcF02wBjtz8JgF80ZX+Uqe+edBIvbY MGX0MtoV7AYuQc1O8hvx/cl0X93Ayc8W1ym3Y7mqJJSErRsxLLMtgHID9ogX3tmIwV nL4zhwdJb7dGhl4l8yMHTDBTDTe3hphq/clDGvnM= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x749iSeq025389; Sun, 4 Aug 2019 09:44:30 +0000 In-Reply-To: <877e7tqr5w.fsf@mini.la.casa> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5D46A902.0007, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=U6m889ju c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=vP13R4J2DFLuIfofEuIA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=QEXdDO2ut3YA:10 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:164542 Archived-At: 4 aug. 2019 kl. 10.19 skrev Daniel Ekl=C3=B6f : >=20 > set-selection has always worked, at least for me. That one is also = enabled by default in xterm.el (when an xterm supporting it is detected, = I assume). Right, it lacks the technical problems of the copy-from-clipboard = direction, since no reply from the terminal is involved. > I'm probably missing something obvious, but how is talking to xclip = more secure than talking to the terminal emulator? Or is the "security = perspective" somewhere else? It's not a problem in Emacs, but by enabling OSC 52 in your terminal, an = adversary might arrange for a crafted string to be sent to it which = would surreptitiously inject malicious data into the clipboard, or = extract secrets from it. The OSC 52 reply itself could cause damage = under some circumstances, or the attacker could just hope for the victim = to paste a command into a shell prompt. > Except that xclip assumes x11. Would it not make sense to support a = window protocol agnostic method? By supporting OSC 52, you support = whatever clipboard mechanism the terminal emulator supports. I can definitely see how OSC 52 can be useful when there is only a = terminal connection to the machine running Emacs, and no out-of-band = conduit for the clipboard. The user needs to enable it actively both in = the terminal and in Emacs; it cannot be used by accident. > Perhaps one could use the heavy weight solution (change quit char) = when 'screen' is detected, but simply use ST in the non-screen case? The thought did cross my mind, but I thought I'd first enquire about the = screen usage, given that I only got it to work with screen, not tmux, = and then only after explicitly setting TERM. Perhaps Philipp Stephani who originally wrote the code could help us = here (sorry about dragging you into the discussion, Philipp). Under what = circumstances did you run it? (It was 4 years ago; it's understandable = if you don't remember much of it.)