Subject: Re: bug#65973: [PATCH] ; send filename, not full path, on EWW form submit

From: Eli Zaretskii <[email-masked]>
Date: Tue, 05 Nov 2024 19:08:02 +0200

> Cc: daniel watson <[email-masked]>, [email-masked]
> From: Sebastián Monía
>  <[email-masked]>
> Date: Tue, 05 Nov 2024 09:34:46 -0500
> 
> 
> /added Jim for visibility/
> 
> This seems like something simple enough to merge.
> Thoughts?
> 
> ozzloy <[email-masked]> writes:
> >  bump
> >
> >  On Wed, Sep 13, 2023 at 11:10 PM daniel watson <[email-masked]> 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 <ENTER> localhost:8086 <ENTER>
> >  3. put the cursor on the word "Browse" <ENTER>
> >  4. select any file to which you have read access for uploading
> >  5. put cursor on "Submit" <ENTER>
> >  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.