version 1.1.1.1, 2013/10/14 10:32:47
|
version 1.1.1.2, 2014/06/15 20:20:05
|
Line 8 BEGIN {
|
Line 8 BEGIN {
|
|
|
use strict; |
use strict; |
use IO::Socket; |
use IO::Socket; |
use Test::More tests => 36; | use Test::More tests => 38; |
use LightyTest; |
use LightyTest; |
|
|
my $tf = LightyTest->new(); |
my $tf = LightyTest->new(); |
Line 197 EOF
|
Line 197 EOF
|
); |
); |
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; |
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; |
ok($tf->handle_http($t) == 0, 'broken IPv4 address - too short'); |
ok($tf->handle_http($t) == 0, 'broken IPv4 address - too short'); |
|
|
|
$t->{REQUEST} = ( <<EOF |
|
GET / HTTP/1.0 |
|
Host: [::1]' UNION SELECT '/ |
|
EOF |
|
); |
|
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; |
|
ok($tf->handle_http($t) == 0, 'IPv6 address + SQL injection'); |
|
|
|
$t->{REQUEST} = ( <<EOF |
|
GET / HTTP/1.0 |
|
Host: [::1]/../../../ |
|
EOF |
|
); |
|
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; |
|
ok($tf->handle_http($t) == 0, 'IPv6 address + path traversal'); |
|
|
|
|
|
|