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#61901: 30.0.50; [PATCH v3] Add safe-local-variable-directories variable. Date: Thu, 11 May 2023 21:11:52 +0300 Message-ID: <83v8gy4u1j.fsf@gnu.org> References: <87r0rpi46l.fsf@mailbox.org> <835y8z55w5.fsf@gnu.org> <87ilcy3mdt.fsf@mailbox.org> <83wn1e4zn5.fsf@gnu.org> <87ednm3ght.fsf@mailbox.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33813"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61901@debbugs.gnu.org To: Antero Mejr Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 20:11:17 2023 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 1pxAl2-0008dh-Oy for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 20:11:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxAkp-0003Bn-W5; Thu, 11 May 2023 14:11:04 -0400 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 1pxAkp-0003BZ-Cc for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 14:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxAkp-00080t-4S for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 14:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxAko-0000lv-DB for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 14:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2023 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61901 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61901-submit@debbugs.gnu.org id=B61901.16838286552948 (code B ref 61901); Thu, 11 May 2023 18:11:02 +0000 Original-Received: (at 61901) by debbugs.gnu.org; 11 May 2023 18:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:53317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxAkh-0000lS-1W for submit@debbugs.gnu.org; Thu, 11 May 2023 14:10:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxAke-0000lD-Mw for 61901@debbugs.gnu.org; Thu, 11 May 2023 14:10:53 -0400 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 1pxAkX-0007xk-Lq; Thu, 11 May 2023 14:10:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8CdMSpYo/IMUa3FC1+SYdiBM6hziX821SKms5UjvTNA=; b=KPvvOFsdMTSu LS5pIBtBnitlZwwClKKyfpXZAz9GciekwHgL56J//mI0LkBLq9ypnuj/md9J2qjAIqRqw0RZaGhgx DwtmncFP2LUeUe+Kcd7yRR7OJMNdvT7m314rJLg+BMmXPS9CZTSf91GtRDIv81CGf8bHYb0kREvNP VJdHWzYIHU7nZg3vFciWbAI9FJ5LQRJ++Rbo29dkBh1nMQz9czLkOfSjkyeDGp7+DxeEui3S/QknS vLMAZQvccpq0XMS++LXc3x7bjn9G6XUync+wNk3iJMCIQIcAT5plWxMlT9541wjGUtj0WfA+GsM8Z kx7QEzk7Tf56ujvd6GUaPQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxAkW-0000ku-5o; Thu, 11 May 2023 14:10:44 -0400 In-Reply-To: <87ednm3ght.fsf@mailbox.org> (message from Antero Mejr on Thu, 11 May 2023 17:49:50 +0000) 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:261586 Archived-At: > From: Antero Mejr > Cc: 61901@debbugs.gnu.org > Date: Thu, 11 May 2023 17:49:50 +0000 > > Eli Zaretskii writes: > > > 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. We already have all that in file-equal-p. We should just use is there.