[packages/perl-Catalyst-Plugin-Static-Simple] Up to 0.38
arekm
arekm at pld-linux.org
Thu Nov 19 09:35:51 CET 2026
commit 06148ad2dd386ef169982118de5bfc436c8d4263
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 19 00:32:33 2026 +0100
Up to 0.38
Fixes CVE-2026-15743 (Cache-Control now configurable, expires 0
honoured) with the upstream patch, not yet in a release.
CVE-2026-15743.patch | 123 ++++++++++++++++++++++++++++++++
perl-Catalyst-Plugin-Static-Simple.spec | 18 +++--
2 files changed, 134 insertions(+), 7 deletions(-)
---
diff --git a/perl-Catalyst-Plugin-Static-Simple.spec b/perl-Catalyst-Plugin-Static-Simple.spec
index 1c5d506..fe76d99 100644
--- a/perl-Catalyst-Plugin-Static-Simple.spec
+++ b/perl-Catalyst-Plugin-Static-Simple.spec
@@ -7,20 +7,23 @@
Summary: Catalyst::Plugin::Static::Simple - make serving static pages painless
Summary(pl.UTF-8): Catalyst::Plugin::Static::Simple - bezpolesne serwowanie stron statycznych
Name: perl-Catalyst-Plugin-Static-Simple
-Version: 0.29
+Version: 0.38
Release: 1
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Source0: http://www.cpan.org/modules/by-module/Catalyst/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: 37c94e08cd227507801b0e6c41603d63
+Source0: https://www.cpan.org/authors/id/E/ET/ETHER/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 518effd795dc72379f4746569a4d7df9
+# https://security.metacpan.org/patches/C/Catalyst-Plugin-Static-Simple/0.38/CVE-2026-15743-r1.patch
+Patch0: CVE-2026-15743.patch
URL: http://search.cpan.org/dist/Catalyst-Plugin-Static-Simple/
-BuildRequires: perl-Module-Build
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
%if %{with tests}
-BuildRequires: perl-Catalyst >= 5.30
-BuildRequires: perl-MIME-Types >= 1.15
+BuildRequires: perl-Catalyst >= 5.80008
+BuildRequires: perl-MIME-Types >= 2.03
+BuildRequires: perl-Moose
+BuildRequires: perl-namespace-autoclean
%endif
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -49,9 +52,10 @@ w IANA został wykorzystany lekki moduł MIME::Types.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch -P0 -p1
%build
-%{__perl} -MExtUtils::MakeMaker -we 'WriteMakefile(NAME=>"Catalyst::Plugin::Static::Simple")' \
+%{__perl} Makefile.PL \
INSTALLDIRS=vendor
%{__make}
diff --git a/CVE-2026-15743.patch b/CVE-2026-15743.patch
new file mode 100644
index 0000000..92aac24
--- /dev/null
+++ b/CVE-2026-15743.patch
@@ -0,0 +1,123 @@
+commit 17c031f7876a7d8b4ab156ac8be922004754efa5
+Author: Robert Rothenberg <perl at rhizomnic.com>
+Date: Mon Aug 17 07:58:08 2026 +0100
+
+ Allow Cache-Control to be configured, and fix the Expires header
+
+ The Cache-Control header was always set to public, with no means of
+ overriding it. (CVE-2026-15743)
+
+ An expires header of 0 was ignored.
+
+ This change allows the Cache-Control header to be overridden, and the
+ Expires header to be set to 0.
+
+ Note: this patch was originally written by Claude Opus 5 but was
+ modified by RRWO to keep the default Cache-Control as "public", to
+ support configuring the default Cache-Control, and to simplify the logic
+ for handling the configured Expires header. RRWO also added
+ documentation.
+
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
+
+ Signed-off-by: Robert Rothenberg <perl at rhizomnic.com>
+
+diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm
+index d8ee9c3..e657ca4 100755
+--- a/lib/Catalyst/Plugin/Static/Simple.pm
++++ b/lib/Catalyst/Plugin/Static/Simple.pm
+@@ -197,19 +197,32 @@ sub _serve_static {
+ my $config = $c->config->{'Plugin::Static::Simple'};
+
+ my $full_path = shift || $c->_static_file;
++ my $requested_cache_control = shift;
+ my $type = $c->_ext_to_type( $full_path );
+ my $stat = stat $full_path;
+
+ $c->res->headers->content_type( $type );
+ $c->res->headers->content_length( $stat->size );
+ $c->res->headers->last_modified( $stat->mtime );
+- # Tell Firefox & friends its OK to cache, even over SSL:
+- $c->res->headers->header('Cache-control' => 'public');
+- # Optionally, set a fixed expiry time:
+- if ($config->{expires}) {
+- $c->res->headers->expires(time() + $config->{expires});
++
++ my $cache_control = $c->res->headers->header('Cache-Control')
++ || $requested_cache_control
++ || $config->{cache_control}
++ || 'public';
++
++ if ( defined $config->{expires} ) {
++
++ if ( $config->{expires} <= 0 ) {
++ $cache_control = 'no-store';
++ $c->res->headers->expires(0);
++ }
++ else {
++ $c->res->headers->expires(time() + $config->{expires});
++ }
+ }
+
++ $c->res->headers->header('Cache-Control' => $cache_control);
++
+ my $fh = IO::File->new( $full_path, 'r' );
+ if ( defined $fh ) {
+ binmode $fh;
+@@ -224,7 +237,7 @@ sub _serve_static {
+ }
+
+ sub serve_static_file {
+- my ( $c, $full_path ) = @_;
++ my ( $c, $full_path, $cache_control ) = @_;
+
+ my $config = $c->config->{'Plugin::Static::Simple'};
+
+@@ -240,7 +253,7 @@ sub serve_static_file {
+ return;
+ }
+
+- $c->_serve_static( $full_path );
++ $c->_serve_static( $full_path, $cache_control );
+ }
+
+ # looks up the correct MIME type for the current file extension
+@@ -479,6 +492,17 @@ module, you may enter your own extension to MIME type mapping.
+ },
+ );
+
++=head2 Controlling caching with the Cache-Control header
++
++By default, the Cache-Control header will be set to "public".
++That can be changed:
++
++ MyApp->config(
++ 'Plugin::Static::Simple' => {
++ cache_control => 'private',
++ },
++ );
++
+ =head2 Controlling caching with Expires header
+
+ The files served by Static::Simple will have a Last-Modified header set,
+@@ -556,7 +580,7 @@ L<Catalyst::Engine::Apache2::MP20>.
+
+ =head1 PUBLIC METHODS
+
+-=head2 serve_static_file $file_path
++=head2 serve_static_file $file_path $cache_control
+
+ Will serve the file located in $file_path statically. This is useful when
+ you need to autogenerate them if they don't exist, or they are stored in a model.
+@@ -569,6 +593,11 @@ you need to autogenerate them if they don't exist, or they are stored in a mode
+ $c->serve_static_file($file_path);
+ }
+
++The $cache_control option will default to what is configured (or to
++"public" if not configured). It can be overridden for specific files:
++
++ $c->serve_static_file( $file_path, "private" );
++
+ =head1 INTERNAL EXTENDED METHODS
+
+ Static::Simple extends the following steps in the Catalyst process.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Catalyst-Plugin-Static-Simple.git/commitdiff/06148ad2dd386ef169982118de5bfc436c8d4263
More information about the pld-cvs-commit
mailing list