unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: phst@google.com, 49723@debbugs.gnu.org, federicotedin@gmail.com
Subject: bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable
Date: Thu, 16 Sep 2021 20:44:32 +0200	[thread overview]
Message-ID: <87pmt8l5rj.fsf@gmx.de> (raw)
In-Reply-To: <83v9308jb9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Sep 2021 21:30:18 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> > +** 'expand-file-name' now checks for null bytes in filenames.
>> > +The function will now check for null bytes in both NAME and
>> > +DEFAULT-DIRECTORY arguments, as well as in the 'default-directory'
>> > +buffer-local variable, assuming its value is used.  If null bytes are
>> > +found, 'expand-file-name' will signal an error.
>>
>> Should this be implemented also in remote file names?
>
> Are we sure remote file names cannot include null bytes?

Likely not. I have added "foo\0bar" as file name in tramp-test.el, and
then I get

--8<---------------cut here---------------start------------->8---
Test tramp-test41-special-characters condition:
    (ert-test-failed
     ((should
       (file-exists-p file1))
      :form
      (file-exists-p "/mock:gandalf:/tmp/tramp-testkLeKOx/foo\0bar")
      :value nil))
   FAILED  1/1  tramp-test41-special-characters (0.484141 sec)

--8<---------------cut here---------------end--------------->8---

Well, perhaps Tramp can be improved to handle null bytes on (remote)
shell level, but do we need this?

Best regards, Michael.





  reply	other threads:[~2021-09-16 18:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 17:39 bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable Eli Zaretskii
2021-09-14 19:01 ` Federico Tedin
2021-09-14 19:24   ` Eli Zaretskii
2021-09-14 22:17     ` Federico Tedin
2021-09-16 12:25       ` Eli Zaretskii
2021-09-16 16:58         ` Federico Tedin
2021-09-16 18:12           ` Michael Albinus
2021-09-16 18:30             ` Eli Zaretskii
2021-09-16 18:44               ` Michael Albinus [this message]
2021-09-16 19:07                 ` Eli Zaretskii
2021-09-16 18:38             ` Federico Tedin
2021-09-16 18:51               ` Michael Albinus
2021-09-16 19:13                 ` Federico Tedin
2021-09-20 11:59                   ` Michael Albinus
2021-09-17  7:49           ` Eli Zaretskii
2021-09-17 19:00             ` Federico Tedin
2021-09-18  6:51               ` Eli Zaretskii
2021-09-18 17:57                 ` Federico Tedin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmt8l5rj.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=49723@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=federicotedin@gmail.com \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).