[Backport release-24.11] perlPackages.FileFindRule: patch for CVE-2011-10007 (#414324)

This commit is contained in:
Thomas Gerbet 2025-06-07 16:46:42 +02:00 committed by GitHub
commit 53c1b903d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,25 @@
From ca70a73bb147549e62e74751d924b1dbb59d1707 Mon Sep 17 00:00:00 2001
From: Stig Palmquist <stig@stig.io>
Date: Thu, 5 Jun 2025 03:45:50 +0200
Subject: [PATCH] Fix CVE-2011-10007
---
lib/File/Find/Rule.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/File/Find/Rule.pm b/lib/File/Find/Rule.pm
index feccc76..d4dc475 100644
--- a/lib/File/Find/Rule.pm
+++ b/lib/File/Find/Rule.pm
@@ -420,7 +420,7 @@ sub grep {
$self->exec( sub {
local *FILE;
- open FILE, $_ or return;
+ open FILE, '<', $_ or return;
local ($_, $.);
while (<FILE>) {
for my $p (@pattern) {
--
2.49.0

View file

@ -13318,6 +13318,9 @@ with self;
url = "mirror://cpan/authors/id/R/RC/RCLAMP/File-Find-Rule-0.34.tar.gz";
hash = "sha256-fm8WzDPrHyn/Jb7lHVE/S4qElHu/oY7bLTzECi1kyv4=";
};
patches = [
../development/perl-modules/FileFindRule-CVE-2011-10007.patch
];
propagatedBuildInputs = [
NumberCompare
TextGlob