From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65973: [PATCH] ; send filename, not full path, on EWW form submit Date: Tue, 05 Nov 2024 19:08:02 +0200 Message-ID: <86bjyttxql.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32386"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, ozzloy@challenge-bot.com, 65973@debbugs.gnu.org, ozzloy@gmail.com To: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 05 18:09:15 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 1t8N3L-0008EV-Ht for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Nov 2024 18:09:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8N3A-0008Lk-El; Tue, 05 Nov 2024 12:09:04 -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 1t8N38-0008Lb-PR for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 12:09: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 1t8N38-0006m7-FI for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 12:09:02 -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:References:In-Reply-To:From:Date:To:Subject; bh=HC9W7KmGLZqDQ3IXrm/MluNM0B/maLDSOMZoLrBP9zw=; b=lOhI8k7ySsBv6A1DDJDdnl+oEOA/NsQeuz7yPlp3RR9Y+2cHf6ml60Y3osKJBWENmTCgENBD2csuNf56hQDuBs/aEZ+7QcYoyGIhNPULk9Cr9QTaxg3Qq/JNyWs38tKMTx3CUBzmaHpJYTreobRWcTC+CQtt/R5EVUstClriyOxafUZY6dHHpPmhhriLYqgEJBN1ZZb5yq87TxPHY8+eZ1kWsAWx4A5YIDpmvE0ufqN3slwyTv233Hcy8Zo5g65stnM5oGrBo8gsK+Za/4QI1l4mepUA1QD3YMXWha7wXVD2UcB2/l0KP5tIZJLkvyb7cCN3HmuZNwwDiS1tVkidWA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8N38-0005b0-2r for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2024 12:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Nov 2024 17:09:02 +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.173082649521502 (code B ref 65973); Tue, 05 Nov 2024 17:09:02 +0000 Original-Received: (at 65973) by debbugs.gnu.org; 5 Nov 2024 17:08:15 +0000 Original-Received: from localhost ([127.0.0.1]:44679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8N2M-0005ak-T9 for submit@debbugs.gnu.org; Tue, 05 Nov 2024 12:08:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8N2J-0005ae-GC for 65973@debbugs.gnu.org; Tue, 05 Nov 2024 12:08:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8N2E-0006jC-0h; Tue, 05 Nov 2024 12:08:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=HC9W7KmGLZqDQ3IXrm/MluNM0B/maLDSOMZoLrBP9zw=; b=mrXQl7ufF5ZGfM6BTem3 BaphPBL8FER7ZtGrJYmBvsMJaX9uul86vKam0tz4A7VSPq26+193i7iE3sjFeFnG13N4+TfHFdwpr 4NgZX/NQHzmf/xnZ7RBZGtWlkZ1s6TPXJbgkMSH3yXzneXlvkutDyMYOxXjJFfvZrqdAg8HMTLBV0 pqymQkH9H5ajqfUfJeBxxfd1hOpsl/ZfjBsT7zHZuG066RKMLuustihLITwLTmySagtqYEnHY35zX eAbDo63ujT+azTbvn8MvcxxuzGNGe/xQ3bVTjjqI6xmqnaPPhqYDizvG2xnmRwtiYicOOQiU9fopa 3kb1BkVB0LJWSA==; In-Reply-To: (sebastian@sebasmonia.com) 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:294911 Archived-At: > Cc: daniel watson , 65973@debbugs.gnu.org > From: Sebastián Monía > > Date: Tue, 05 Nov 2024 09:34:46 -0500 > > > /added Jim for visibility/ > > This seems like something simple enough to merge. > Thoughts? > > ozzloy writes: > > bump > > > > On Wed, Sep 13, 2023 at 11:10 PM 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. I'd like some rationale for this change. The original report never explains why sending the full absolute file name to the server is bad. Please note that using file names without directories in Emacs means that the file is presumed to live in the current-buffer's default-directory. I'm not sure I understand why this is correct in this case, and neither am I sure that the server will interpret it like that (because the server might run in a different directory). But maybe I'm missing something important here. Thanks.