Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion t/modules/setenvif.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ my @var = qw(VAR_ONE VAR_TWO VAR_THREE);

my $htaccess = "$htdocs/modules/setenvif/htaccess/.htaccess";

plan tests => @var * 10 + (keys %var_att) * 6 * @var + 4,
plan tests => @var * 10 + (keys %var_att) * 6 * @var + 5,
have_module qw(setenvif include);

sub write_htaccess {
Expand Down Expand Up @@ -178,6 +178,16 @@ else {
skip "skipping inverted match test with version <2.4.38"
}

if (need_min_apache_version("2.4.67")) {
# file() access should be disallowed in htaccess context
write_htaccess("SetEnvIfExpr \"file('$htdocs/foobar.html') =~ /(.+)/\" VAR_ONE=\$0");
$body = GET_BODY $page;
ok ! t_cmp($body, qr/^1:foobar/);
}
else {
skip "skipping test for CVE-2026-24072 in version <2.4.67";
}

## i think this should work, but it doesnt.
## leaving it commented now pending investigation.
## seems you cant override variables that have been previously set.
Expand Down
Loading