From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Newsgroups: gmane.emacs.bugs Subject: bug#65973: [PATCH] ; send filename, not full path, on EWW form submit Date: Tue, 05 Nov 2024 09:34:46 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: daniel watson , 65973@debbugs.gnu.org To: ozzloy , Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 05 15:35:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t8KeN-00034u-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Nov 2024 15:35:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8Ke9-0007pV-OZ; Tue, 05 Nov 2024 09:35:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8Ke7-0007lr-Hr for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 09:35:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8Ke7-0006IT-8k for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 09:35:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=XVpQolgYmaeYIfLaAwwGyJtJbBl88RGp4N/MqXh5D18=; b=XGJiG/leXXpscfKnl8InemUFAZt0XpbnkgnxxW0SMUI8Mbwrd5gKhROsn4up/6LN0KfFm6XffO0GkHKsr90CdlGl5qYA/cy7DncEC2Q7rXyCci7qFngZlppQ9PNTQl76eu7ElvFziVCIn2UuD/OD5K2OaghpY3Sm+kxhgvjhPM2Hv8cdgKSOErRv4HkfUynI5kKNxuzpfJyp9ef5DEl7JbgPydfgFKEdWPoqcPsEHPO+Q21oU67bK/hoDO394fTUa1CpPwM97cjQT7Gq4Fbj5zJPREmRMu3v8B3oiVEPbTrBtC20f1r2kokzZCBEKp9YlureyHggaGy47k8N1PdNfw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8Ke5-000177-Sy for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 09:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Nov 2024 14:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65973-submit@debbugs.gnu.org id=B65973.17308172994270 (code B ref 65973); Tue, 05 Nov 2024 14:35:01 +0000 Original-Received: (at 65973) by debbugs.gnu.org; 5 Nov 2024 14:34:59 +0000 Original-Received: from localhost ([127.0.0.1]:43996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8Ke2-00016o-0V for submit@debbugs.gnu.org; Tue, 05 Nov 2024 09:34:58 -0500 Original-Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]:41629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8Kdx-00016i-VD for 65973@debbugs.gnu.org; Tue, 05 Nov 2024 09:34:56 -0500 Original-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id CC2EF138039B; Tue, 5 Nov 2024 09:34:47 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 05 Nov 2024 09:34:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1730817287; x=1730903687; bh=XVpQolgYmaeYIfLaAwwGyJtJbBl88RGp 4N/MqXh5D18=; b=V1IF4HA+n720qW3zwMmjNavZOZLviCxklu0I/BHU7DfoLeEV ynRW9ICdfCCa63GstGmYXttYAl7knHSpvm9kyPlw+Og4cn4fVcpZc2dfWzGygviV rHnN+wHZDzeBJVA28NxdlA78CBBVOvpH2EES2LneNh3KYv0rt9VLwHB0gCmcAFqp TVy0j/rAFb8lxJ5Ad7ajPRyJ3m+Zpf+X+Qq5LkZZt50IbAHgA7ksoHYKuf1yu1RF 4a5iFw/I1kA0S9tqRXBH5EFrjuJI8Zg3+iYFbPTBu/tOkKQQ+zZLNLt0fV6579fX dTZ1IXGqQtqQiXfoOan8fnrOx0JXWxlCMfOLLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1730817287; x= 1730903687; bh=XVpQolgYmaeYIfLaAwwGyJtJbBl88RGp4N/MqXh5D18=; b=E /ZusD7b0GweePb9r0W6f/bxNdN7ahQ87SrmgnMVZ2iUqXGu1/ZvPq9kNZK8z40uP ko3qzl4AhNJlHOh8zCpc/uh6fZDp0rjoag58WCaCUDtm1Jve46iIx6rqeEEOne4r zZzncX9FLE7SIU4QRj7LxSKFzcv8kzDwLKR4SWsnvi8q5Sr0a7CMl/12O9tWKQO4 Lc7tV7xx4otYadu7BEer9PhDdy+pyY6NXUunErzie9iVR79Cqy1cdOcNOSDaxA5U Z5xIip9+fCGEsUj7sL76MV4TcSpEGyvrShLwb4urQ1UQLWBn9nbWkdQT/+kxKaBf JMVyc30tvMqlqVOI+NB/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrtddtgdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujg hffffkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefuvggsrghsthhijohnucfoohhn vogruceoshgvsggrshhtihgrnhesshgvsggrshhmohhnihgrrdgtohhmqeenucggtffrrg htthgvrhhnpedtiedtuddtfeehjedugeduuedvgedtvdfgieeuleeihfffkeehtdelffek feduudenucffohhmrghinhepshhrrdhhthdpshgvrhhvvghrrdhphidpshgvsggrshhmoh hnihgrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepshgvsggrshhtihgrnhesshgvsggrshhmohhnihgrrdgtohhmpdhnsggprhgtph htthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeeiheeljeefseguvggs sghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepohiiiihlohihsegthhgrlhhlvghngh gvqdgsohhtrdgtohhmpdhrtghpthhtohepjhhpohhrthgvrhgsuhhgshesghhmrghilhdr tghomhdprhgtphhtth X-ME-Proxy: Feedback-ID: iab2c46da:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Nov 2024 09:34:47 -0500 (EST) In-Reply-To: (ozzloy@gmail.com's message of "Sat, 2 Dec 2023 07:02:20 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294906 Archived-At: /added Jim for visibility/ This seems like something simple enough to merge. Thoughts? ozzloy writes: > bump > > On Wed, Sep 13, 2023 at 11:10=E2=80=AFPM daniel watson wrote: > > 0. in one terminal, run this http server > https://git.sr.ht/~ozzloy/emacs-bug-63941/tree/master/item/server.py > 1. in another terminal, run > socat -v tcp-listen:8086,fork tcp:localhost:8085 > 2. browse to the page with EWW, > M-x eww localhost:8086 > 3. put the cursor on the word "Browse" > 4. select any file to which you have read access for uploading > 5. put cursor on "Submit" > 6. observe the full path of the file is sent to the server. this is > visible in both the python output and the socat output. > > i'm including the diff inline to make it easier to review without > downloading the attached file. > > --- > lisp/net/eww.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/net/eww.el b/lisp/net/eww.el > index 4ddda216afc..f28273dcc58 100644 > --- a/lisp/net/eww.el > +++ b/lisp/net/eww.el > @@ -1849,7 +1849,7 @@ eww-submit > (insert-file-contents file) > (buffer-string))) > (cons "name" name) > - (cons "filename" file)) > + (cons "filename" (file-name-nondirectory file= ))) > values))) > ((equal (plist-get input :type) "submit") > ;; We want the values from buttons if we hit a button if > --=20 > 2.39.2 > > In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, > cairo version 1.16.0) of 2023-08-03 built on bos03-amd64-031 > Repository revision: cf57ec68c2a5ac5b721f445928869ca14232a4d1 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.121010= 07 > System Description: Ubuntu 23.04 > > Configured using: > 'configure --prefix=3D/snap/emacs/current/usr --with-x-toolkit=3Dgtk3 > --without-xaw3d --with-modules --with-cairo > --with-native-compilation=3Daot --with-xinput2 --with-tree-sitter > --with-json > 'CFLAGS=3D-isystem/build/emacs/parts/emacs/install/usr/include > -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu > -isystem/build/emacs/stage/usr/include -O2' > 'CPPFLAGS=3D-isystem/build/emacs/parts/emacs/install/usr/include > -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu > -isystem/build/emacs/stage/usr/include' > 'LDFLAGS=3D-L/build/emacs/parts/emacs/install/lib > -L/build/emacs/parts/emacs/install/usr/lib > -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu > -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu > -L/build/emacs/stage/usr/lib'' > --=20 Sebasti=C3=A1n Mon=C3=ADa https://site.sebasmonia.com/