Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix(security): reject the request if it's rejected by access controller #768

Merged
merged 1 commit into from
Mar 2, 2021
Merged
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
1 change: 1 addition & 0 deletions src/replica/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ void replica::on_client_read(dsn::message_ex *request, bool ignore_throttling)
{
if (!_access_controller->allowed(request)) {
response_client_read(request, ERR_ACL_DENY);
return;
}

CHECK_REQUEST_IF_SPLITTING(read)
Expand Down
3 changes: 2 additions & 1 deletion src/replica/replica_2pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ void replica::on_client_write(dsn::message_ex *request, bool ignore_throttling)
_checker.only_one_thread_access();

if (!_access_controller->allowed(request)) {
response_client_read(request, ERR_ACL_DENY);
response_client_write(request, ERR_ACL_DENY);
return;
}

if (_deny_client_write) {
Expand Down