From: Daniel Watson Date: Tue, 12 Sep 2023 07:06:14 +0000 (-0700) Subject: When submitting files in EWW, only send the file's basename X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2aa46bdcd61a1dac8e03c330babd4ce97af22a41;p=emacs.git When submitting files in EWW, only send the file's basename * lisp/net/eww.el (eww-submit): Send the basename, not the full filename (bug#65973). Copyright-paperwork-exempt: yes (cherry picked from commit f6b55678d76a7b549993d629672a4f33d269dbd8) --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index d33604038cb..43411cc640f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -2066,7 +2066,11 @@ Interactively, EVENT is the value of `last-nonmenu-event'." (insert-file-contents file) (buffer-string))) (cons "name" name) - (cons "filename" file)) + ;; RFC 2183 declares that recipients should + ;; only respect the basename of the filename + ;; parameter, so we only send that portion in + ;; our request. + (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