Blame tests/regression/misc/50-ipmatchfromfile-external.t.in

Packit Service 384592
### ipMatchFromFile external resource
Packit Service 384592
Packit Service 384592
{
Packit Service 384592
	type => "misc",
Packit Service 384592
	comment => "ipMatchFromFile",
Packit Service 384592
	conf => qq(
Packit Service 384592
		SecRuleEngine On
Packit Service 384592
		SecDebugLog $ENV{DEBUG_LOG}
Packit Service 384592
		SecDebugLogLevel 9
Packit Service 384592
                SecRequestBodyAccess On
Packit Service 384592
		SecRule REMOTE_ADDR "\@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test.txt" "id:10500,pass"
Packit Service 384592
	),
Packit Service 384592
	match_log => {
Packit Service 384592
		error => [ qr/ModSecurity: Warning. IPmatchFromFile: \"127.0.0.1\" matched at REMOTE_ADDR./, 1],
Packit Service 384592
		debug => [ qr/IPmatchFromFile: \"127.0.0.1\" matched at REMOTE_ADDR./, 1 ],
Packit Service 384592
		-error => [ qr/ModSecurity: Problems loading external resources:/, 1],
Packit Service 384592
	},
Packit Service 384592
	match_response => {
Packit Service 384592
		status => qr/^404$/,
Packit Service 384592
	},
Packit Service 384592
	request => new HTTP::Request(
Packit Service 384592
		POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html",
Packit Service 384592
		[
Packit Service 384592
			"Content-Type" => "application/x-www-form-urlencoded",
Packit Service 384592
		],
Packit Service 384592
		#  Args
Packit Service 384592
		"some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--"
Packit Service 384592
	),
Packit Service 384592
},
Packit Service 384592
{
Packit Service 384592
	type => "misc",
Packit Service 384592
	comment => "ipMatchFromFile - 404 download",
Packit Service 384592
	conf => qq(
Packit Service 384592
		SecRuleEngine On
Packit Service 384592
		SecDebugLog $ENV{DEBUG_LOG}
Packit Service 384592
		SecDebugLogLevel 9
Packit Service 384592
                SecRequestBodyAccess On
Packit Service 384592
		SecRemoteRulesFailAction Warn
Packit Service 384592
		SecRule REMOTE_ADDR "\@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test-404.txt" "id:10500,pass"
Packit Service 384592
	),
Packit Service 384592
	match_log => {
Packit Service 384592
		error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/www.modsecurity.org\/modsecurity-regression-test-404.txt\" error: HTTP response code said error./, 1],
Packit Service 384592
	},
Packit Service 384592
	match_response => {
Packit Service 384592
		status => qr/^404$/,
Packit Service 384592
	},
Packit Service 384592
	request => new HTTP::Request(
Packit Service 384592
		POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html",
Packit Service 384592
		[
Packit Service 384592
			"Content-Type" => "application/x-www-form-urlencoded",
Packit Service 384592
		],
Packit Service 384592
		#  Args
Packit Service 384592
		"some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--"
Packit Service 384592
	),
Packit Service 384592
},
Packit Service 384592
{
Packit Service 384592
	type => "misc",
Packit Service 384592
	comment => "ipMatchFromFile - bad certificate name",
Packit Service 384592
	conf => qq(
Packit Service 384592
		SecRuleEngine On
Packit Service 384592
		SecDebugLog $ENV{DEBUG_LOG}
Packit Service 384592
		SecDebugLogLevel 9
Packit Service 384592
                SecRequestBodyAccess On
Packit Service 384592
		SecRemoteRulesFailAction Warn
Packit Service 384592
		SecRule REMOTE_ADDR "\@ipMatchFromFile https://status.modsecurity.org/modsecurity-regression-test-huge-ip-list.txt" "id:10500,pass"
Packit Service 384592
	),
Packit Service 384592
	match_log => {
Packit Service 384592
		error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/status.modsecurity.org\/modsecurity-regression-test-huge-ip-list.txt\" error: [SSL peer certificate or SSH remote key was not OK.|Couldn't connect to server.]/, 1],
Packit Service 384592
	},
Packit Service 384592
},
Packit Service 384592