Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appsec/src/extension/request_abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ static const char static_error_html[] =
"target=\"_blank\">Datadog</a></p></footer></body></html>";

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;
Expand Down
2 changes: 1 addition & 1 deletion appsec/tests/extension/push_params_block_01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/push_params_block_04.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_from_rinit_auto.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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":""}
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_mid_request_auto.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_mid_request_json.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_redirection_03.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_redirection_04.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion appsec/tests/extension/req_abort_redirection_05.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions appsec/tests/extension/user_req_basic_01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ 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
)

)
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
)

)
Expand Down
8 changes: 4 additions & 4 deletions appsec/tests/extension/user_req_basic_02.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ 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
)

)
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
)

)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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'
}
Expand Down
Loading