From: Antero Mejr via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61901@debbugs.gnu.org
Subject: bug#61901: 30.0.50; [PATCH v3] Add safe-local-variable-directories variable.
Date: Thu, 11 May 2023 17:49:50 +0000 [thread overview]
Message-ID: <87ednm3ght.fsf@mailbox.org> (raw)
In-Reply-To: <83wn1e4zn5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 11 May 2023 19:10:54 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
>> index b3a8cd8110c..28deddf985d 100644
>> --- a/doc/lispref/variables.texi
>> +++ b/doc/lispref/variables.texi
>> @@ -1986,7 +1986,7 @@ fully-expanded absolute file names that end in a
>> directory separator
>> character. They may also be remote directories if the variable
>> @code{enable-remote-dir-locals} is set non-@code{nil}. Directories in
>> this list are matched case-sensitively, even if the filesystem is
>> -case-sensitive.
>> +case-insensitive.
>> @end defvar
>
> This actually means that I misunderstood the code. Now that I see the
> truth, why is it a good idea to compare directories case-sensitively
> when the filesystem is not? That's not something users will expect.
What if a directory's case sensitivity changes so that it previously did
not match, but now does? This could happen with Windows per-directory
case sensitivity modifications, mounted disks, or remote paths.
To accurately assess if a directory name matches with possible
case-sensitivity, the process would be:
1. check the case-sensitivity of the filesystem
2. If case insensitive, check the case-sensitivity of each subdirectory
(using Windows queryCaseSensitiveInfo if applicable)
3. map over the components of the directory name, checking each subdirectory
with the correct case-sensitivity setting
That logic would be difficult for users to reason about, so for features
with security considerations like this I think it's better to err on the
side of safety and simplicity even if the behavior is stricter than
expected.
next prev parent reply other threads:[~2023-05-11 17:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 22:20 bug#61901: 30.0.50; [PATCH] Add permanently-enabled-local-variable-dirs variable Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-02 6:57 ` Eli Zaretskii
2023-03-02 17:09 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-02 18:04 ` Eli Zaretskii
2023-03-14 18:46 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-14 19:48 ` Eli Zaretskii
2023-04-25 16:40 ` bug#61901: 30.0.50; [PATCH v3] Add safe-local-variable-directories variable Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-25 17:23 ` Eli Zaretskii
2023-05-09 21:29 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 13:55 ` Eli Zaretskii
[not found] ` <87ilcy3mdt.fsf@mailbox.org>
2023-05-11 16:10 ` Eli Zaretskii
2023-05-11 17:49 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-05-11 18:11 ` Eli Zaretskii
2023-05-11 20:11 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 21:38 ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 11:09 ` Eli Zaretskii
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=87ednm3ght.fsf@mailbox.org \
--to=bug-gnu-emacs@gnu.org \
--cc=61901@debbugs.gnu.org \
--cc=antero@mailbox.org \
--cc=eliz@gnu.org \
/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).