summaryrefslogtreecommitdiff
path: root/rt/t/web/path-traversal.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-02 14:24:21 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-02 14:24:21 -0700
commit85e677b86fc37c54e6de2b06340351a28f5a5916 (patch)
tree11148e2c292bd1a43b7cf6c2f5212a6ca8b03e75 /rt/t/web/path-traversal.t
parente5ab051ccdb7637d8dd2f0ed9b4fe9aaaf1d1100 (diff)
parent92aedddd3684167abb60cd3f1d77bbc156c592e6 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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");