diff --git a/appsec/src/extension/request_abort.c b/appsec/src/extension/request_abort.c index 55f09b2d54..60da37a734 100644 --- a/appsec/src/extension/request_abort.c +++ b/appsec/src/extension/request_abort.c @@ -60,9 +60,9 @@ static const char static_error_html[] = "target=\"_blank\">Datadog

"; static const char static_error_json[] = - "{\"errors\": [{\"title\": \"You've been blocked\", \"detail\": \"Sorry, yo" + "{\"errors\":[{\"title\":\"You've been blocked\",\"detail\":\"Sorry, yo" "u cannot access this page. Please contact the customer service team. Secur" - "ity provided by Datadog.\"}], \"security_response_id\": " + "ity provided by Datadog.\"}],\"security_response_id\":" "\"[security_response_id]\"}"; static zend_string *_initial_cwd; diff --git a/appsec/tests/extension/push_params_block_01.phpt b/appsec/tests/extension/push_params_block_01.phpt index af4da907a7..61ceb5aa18 100644 --- a/appsec/tests/extension/push_params_block_01.phpt +++ b/appsec/tests/extension/push_params_block_01.phpt @@ -25,5 +25,5 @@ var_dump("THIS SHOULD NOT GET IN THE OUTPUT"); Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\push_addresses(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/push_params_block_04.phpt b/appsec/tests/extension/push_params_block_04.phpt index 62c1b8b6c7..f0884fc43c 100644 --- a/appsec/tests/extension/push_params_block_04.phpt +++ b/appsec/tests/extension/push_params_block_04.phpt @@ -25,5 +25,5 @@ var_dump("THIS SHOULD NOT GET IN THE OUTPUT"); Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": "some-id-here"} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":"some-id-here"} Warning: datadog\appsec\push_addresses(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: some-id-here in %s on line %d diff --git a/appsec/tests/extension/req_abort_empty_custom_json_template.phpt b/appsec/tests/extension/req_abort_empty_custom_json_template.phpt index 87bf8eefc1..161f1f965e 100644 --- a/appsec/tests/extension/req_abort_empty_custom_json_template.phpt +++ b/appsec/tests/extension/req_abort_empty_custom_json_template.phpt @@ -21,5 +21,5 @@ rinit(); Status: 500 Internal Server Error Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_from_rinit_auto.phpt b/appsec/tests/extension/req_abort_from_rinit_auto.phpt index 99379b035b..530457e017 100644 --- a/appsec/tests/extension/req_abort_from_rinit_auto.phpt +++ b/appsec/tests/extension/req_abort_from_rinit_auto.phpt @@ -19,5 +19,5 @@ rinit(); Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_from_rinit_invalid_content_type.phpt b/appsec/tests/extension/req_abort_from_rinit_invalid_content_type.phpt index ddeb35579d..d83d451041 100644 --- a/appsec/tests/extension/req_abort_from_rinit_invalid_content_type.phpt +++ b/appsec/tests/extension/req_abort_from_rinit_invalid_content_type.phpt @@ -20,5 +20,5 @@ rinit(); Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_from_rinit_invalid_status_code.phpt b/appsec/tests/extension/req_abort_from_rinit_invalid_status_code.phpt index fdba27453d..6dfef5e434 100644 --- a/appsec/tests/extension/req_abort_from_rinit_invalid_status_code.phpt +++ b/appsec/tests/extension/req_abort_from_rinit_invalid_status_code.phpt @@ -20,5 +20,5 @@ rinit(); Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_from_rinit_json_404.phpt b/appsec/tests/extension/req_abort_from_rinit_json_404.phpt index 00eabbdac0..3c9b2e9e9e 100644 --- a/appsec/tests/extension/req_abort_from_rinit_json_404.phpt +++ b/appsec/tests/extension/req_abort_from_rinit_json_404.phpt @@ -19,5 +19,5 @@ rinit(); Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_from_rshutdown_auto.phpt b/appsec/tests/extension/req_abort_from_rshutdown_auto.phpt index ca6dced11b..bf1d0b42cb 100644 --- a/appsec/tests/extension/req_abort_from_rshutdown_auto.phpt +++ b/appsec/tests/extension/req_abort_from_rshutdown_auto.phpt @@ -23,4 +23,4 @@ rshutdown(); Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} diff --git a/appsec/tests/extension/req_abort_from_user_login_success_event.phpt b/appsec/tests/extension/req_abort_from_user_login_success_event.phpt index 4e6db2f602..0895544006 100644 --- a/appsec/tests/extension/req_abort_from_user_login_success_event.phpt +++ b/appsec/tests/extension/req_abort_from_user_login_success_event.phpt @@ -36,5 +36,5 @@ echo "SHOULD NOT BE REACHED\n"; Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\track_user_login_success_event(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_mid_request_auto.phpt b/appsec/tests/extension/req_abort_mid_request_auto.phpt index 62d6e613b3..49d520b00e 100644 --- a/appsec/tests/extension/req_abort_mid_request_auto.phpt +++ b/appsec/tests/extension/req_abort_mid_request_auto.phpt @@ -9,5 +9,5 @@ THIS SHOULD NOT BE REACHED Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\abort_static_page(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_mid_request_json.phpt b/appsec/tests/extension/req_abort_mid_request_json.phpt index fedca7ea46..cbc91113dc 100644 --- a/appsec/tests/extension/req_abort_mid_request_json.phpt +++ b/appsec/tests/extension/req_abort_mid_request_json.phpt @@ -11,5 +11,5 @@ THIS SHOULD NOT BE REACHED Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\abort_static_page(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_mid_request_json_fallback.phpt b/appsec/tests/extension/req_abort_mid_request_json_fallback.phpt index 2e5369ed7e..4e1f96ffcb 100644 --- a/appsec/tests/extension/req_abort_mid_request_json_fallback.phpt +++ b/appsec/tests/extension/req_abort_mid_request_json_fallback.phpt @@ -11,5 +11,5 @@ THIS SHOULD NOT BE REACHED Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\abort_static_page(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_mid_request_json_multiaccept.phpt b/appsec/tests/extension/req_abort_mid_request_json_multiaccept.phpt index 0119983419..7b6704a0f2 100644 --- a/appsec/tests/extension/req_abort_mid_request_json_multiaccept.phpt +++ b/appsec/tests/extension/req_abort_mid_request_json_multiaccept.phpt @@ -11,5 +11,5 @@ THIS SHOULD NOT BE REACHED Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\abort_static_page(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_mid_request_json_weight.phpt b/appsec/tests/extension/req_abort_mid_request_json_weight.phpt index 721e1eecd7..4e1fd1531e 100644 --- a/appsec/tests/extension/req_abort_mid_request_json_weight.phpt +++ b/appsec/tests/extension/req_abort_mid_request_json_weight.phpt @@ -11,5 +11,5 @@ THIS SHOULD NOT BE REACHED Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\abort_static_page(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/req_abort_redirection_03.phpt b/appsec/tests/extension/req_abort_redirection_03.phpt index 17939ce522..bd31ade6a2 100644 --- a/appsec/tests/extension/req_abort_redirection_03.phpt +++ b/appsec/tests/extension/req_abort_redirection_03.phpt @@ -22,5 +22,5 @@ Some content here which should not be displayed Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d \ No newline at end of file diff --git a/appsec/tests/extension/req_abort_redirection_04.phpt b/appsec/tests/extension/req_abort_redirection_04.phpt index ec88ea882d..cf357f06fb 100644 --- a/appsec/tests/extension/req_abort_redirection_04.phpt +++ b/appsec/tests/extension/req_abort_redirection_04.phpt @@ -22,5 +22,5 @@ Some content here which should be displayed Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d \ No newline at end of file diff --git a/appsec/tests/extension/req_abort_redirection_05.phpt b/appsec/tests/extension/req_abort_redirection_05.phpt index 266c248243..f750720e35 100644 --- a/appsec/tests/extension/req_abort_redirection_05.phpt +++ b/appsec/tests/extension/req_abort_redirection_05.phpt @@ -22,5 +22,5 @@ Some content here which should not be displayed Status: 403 Forbidden Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\testing\rinit(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d \ No newline at end of file diff --git a/appsec/tests/extension/user_req_basic_01.phpt b/appsec/tests/extension/user_req_basic_01.phpt index fb569b145e..066c589ada 100644 --- a/appsec/tests/extension/user_req_basic_01.phpt +++ b/appsec/tests/extension/user_req_basic_01.phpt @@ -75,11 +75,11 @@ Result of notify_start: Array ( [status] => 403 - [body] => {"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} + [body] => {"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} [headers] => Array ( [Content-Type] => application/json - [Content-Length] => 195 + [Content-Length] => 189 ) ) @@ -87,11 +87,11 @@ Result of notify_commit: Array ( [status] => 403 - [body] => {"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} + [body] => {"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} [headers] => Array ( [Content-Type] => application/json - [Content-Length] => 195 + [Content-Length] => 189 ) ) diff --git a/appsec/tests/extension/user_req_basic_02.phpt b/appsec/tests/extension/user_req_basic_02.phpt index 7c1373e7ff..7d768da77c 100644 --- a/appsec/tests/extension/user_req_basic_02.phpt +++ b/appsec/tests/extension/user_req_basic_02.phpt @@ -75,11 +75,11 @@ Result of notify_start: Array ( [status] => 403 - [body] => {"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} + [body] => {"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} [headers] => Array ( [Content-Type] => application/json - [Content-Length] => 195 + [Content-Length] => 189 ) ) @@ -87,11 +87,11 @@ Result of notify_commit: Array ( [status] => 403 - [body] => {"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} + [body] => {"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} [headers] => Array ( [Content-Type] => application/json - [Content-Length] => 195 + [Content-Length] => 189 ) ) diff --git a/appsec/tests/extension/user_tracking_block_from_login_failure_v2.phpt b/appsec/tests/extension/user_tracking_block_from_login_failure_v2.phpt index 62bc012942..caa1adeaf4 100644 --- a/appsec/tests/extension/user_tracking_block_from_login_failure_v2.phpt +++ b/appsec/tests/extension/user_tracking_block_from_login_failure_v2.phpt @@ -35,5 +35,5 @@ echo "SHOULD NOT BE REACHED\n"; Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\v2\track_user_login_failure(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/user_tracking_block_from_login_success.phpt b/appsec/tests/extension/user_tracking_block_from_login_success.phpt index ef02dd4814..0272e764a1 100644 --- a/appsec/tests/extension/user_tracking_block_from_login_success.phpt +++ b/appsec/tests/extension/user_tracking_block_from_login_success.phpt @@ -36,5 +36,5 @@ echo "SHOULD NOT BE REACHED\n"; Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\track_user_login_success_event(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/user_tracking_block_from_login_success_v2.phpt b/appsec/tests/extension/user_tracking_block_from_login_success_v2.phpt index 2f3f0160a1..7527ce17ac 100644 --- a/appsec/tests/extension/user_tracking_block_from_login_success_v2.phpt +++ b/appsec/tests/extension/user_tracking_block_from_login_success_v2.phpt @@ -35,5 +35,5 @@ echo "SHOULD NOT BE REACHED\n"; Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: datadog\appsec\v2\track_user_login_success(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/extension/user_tracking_block_from_set_user.phpt b/appsec/tests/extension/user_tracking_block_from_set_user.phpt index d2569ebfcc..849a9eac44 100644 --- a/appsec/tests/extension/user_tracking_block_from_set_user.phpt +++ b/appsec/tests/extension/user_tracking_block_from_set_user.phpt @@ -34,5 +34,5 @@ echo "SHOULD NOT BE REACHED\n"; Status: 404 Not Found Content-type: application/json --EXPECTF-- -{"errors": [{"title": "You've been blocked", "detail": "Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}], "security_response_id": ""} +{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}],"security_response_id":""} Warning: DDTrace\set_user(): Datadog blocked the request and presented a static error page. No action required. Security Response ID: in %s on line %d diff --git a/appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/WorkerStrategyTests.groovy b/appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/WorkerStrategyTests.groovy index 3b2c00da8b..54f32bc50d 100644 --- a/appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/WorkerStrategyTests.groovy +++ b/appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/WorkerStrategyTests.groovy @@ -46,7 +46,7 @@ trait WorkerStrategyTests { HttpRequest req = container.buildReq('/') .header('X-Forwarded-For', '80.80.80.80').GET().build() def trace = container.traceFromRequest(req, ofString()) { HttpResponse re -> - assert re.body().contains('"title": "You\'ve been blocked"') + assert re.body().contains('"title":"You\'ve been blocked"') assert re.statusCode() == 403 assert re.headers().firstValue('Content-type').get() == 'application/json' }