summaryrefslogtreecommitdiff
path: root/rt/t/web/path-traversal.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
committerIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
commit6587f6ba7d047ddc1686c080090afe7d53365bd4 (patch)
treeec77342668e8865aca669c9b4736e84e3077b523 /rt/t/web/path-traversal.t
parent47153aae5c2fc00316654e7277fccd45f72ff611 (diff)
first pass RT4 merge, RT#13852
Diffstat (limited to 'rt/t/web/path-traversal.t')
-rw-r--r--rt/t/web/path-traversal.t12
1 files changed, 9 insertions, 3 deletions
diff --git a/rt/t/web/path-traversal.t b/rt/t/web/path-traversal.t
index 8d2f5cc88..5d5c954a1 100644
--- a/rt/t/web/path-traversal.t
+++ b/rt/t/web/path-traversal.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 20;
+use RT::Test tests => 22;
my ($baseurl, $agent) = RT::Test->started_ok;
@@ -19,11 +19,17 @@ $agent->warning_like(qr/Invalid request.*aborting/,);
$agent->get("$baseurl/NoAuth/../../../etc/RT_Config.pm");
is($agent->status, 400);
-$agent->warning_like(qr/Invalid request.*aborting/,);
+SKIP: {
+ skip "Apache rejects busting up above / for us", 2 if $ENV{RT_TEST_WEB_HANDLER} =~ /^apache/;
+ $agent->warning_like(qr/Invalid request.*aborting/,);
+};
$agent->get("$baseurl/NoAuth/css/web2/images/../../../../../../etc/RT_Config.pm");
is($agent->status, 400);
-$agent->warning_like(qr/Invalid request.*aborting/,);
+SKIP: {
+ skip "Apache rejects busting up above / for us", 2 if $ENV{RT_TEST_WEB_HANDLER} =~ /^apache/;
+ $agent->warning_like(qr/Invalid request.*aborting/,);
+};
# do not reject these URLs, even though they contain /. outside the path
$agent->get("$baseurl/index.html?ignored=%2F%2E");