Skip to content

Commit

Permalink
Fix incorrect naming in update configuration protection
Browse files Browse the repository at this point in the history
  • Loading branch information
RongtongJin committed Jun 12, 2023
1 parent 7d9c79b commit e07754f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ private RemotingCommand updateConfig(ChannelHandlerContext ctx, RemotingCommand
return response;
}

if (properties.containsKey("kvConfigPath") || properties.containsKey("configStorePathName")) {
if (properties.containsKey("kvConfigPath") || properties.containsKey("configStorePath")) {
response.setCode(ResponseCode.NO_PERMISSION);
response.setRemark("Can not update config path");
return response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void testProcessRequest_UpdateConfigPath() throws RemotingCommandExceptio

//update disallowed value
properties.clear();
properties.setProperty("configStorePathName", "test/path");
properties.setProperty("configStorePath", "test/path");
updateConfigRequest.setBody(MixAll.properties2String(properties).getBytes(StandardCharsets.UTF_8));

response = defaultRequestProcessor.processRequest(null, updateConfigRequest);
Expand Down

0 comments on commit e07754f

Please sign in to comment.