Skip to content

Commit

Permalink
[JSONRPC] Fix method for security clearance (rdkcentral#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaszm authored Apr 16, 2024
1 parent 98a05c3 commit c9e5173
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/plugins/JSONRPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,12 @@ namespace PluginHost {

ASSERT(Core::JSONRPC::Message::Callsign(method).empty() || (Core::JSONRPC::Message::Callsign(method) == _callsign));

string realMethod(Core::JSONRPC::Message::Method(method));

result = Core::ERROR_NONE;

if (_validate != nullptr) {
classification validation = _validate(token, method, parameters);
classification validation = _validate(token, realMethod, parameters);
if (validation == classification::INVALID) {
result = Core::ERROR_PRIVILIGED_REQUEST;
}
Expand All @@ -576,7 +578,6 @@ namespace PluginHost {

// Seems we are on the right handler..
// now see if someone supports this version
string realMethod(Core::JSONRPC::Message::Method(method));

if (realMethod == _T("versions")) {
_versions.ToString(response);
Expand Down

0 comments on commit c9e5173

Please sign in to comment.