Skip to content

Commit

Permalink
Merge pull request #702 from OpenEVSE/jeremypoulter/issue643
Browse files Browse the repository at this point in the history
Block all RAPI commands that are not the read only `$G...` ones
  • Loading branch information
glynhudson authored Aug 30, 2023
2 parents 0dd3cc7 + d636dd7 commit 888c5c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/evse_man.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ bool EvseManager::claim(EvseClient client, int priority, EvseProperties &target)
{
DBUGF("Found slot");
if(slot->claim(client, priority, target))
{
{
DBUGF("Claim added/updated, waking task");
_evaluateClaims = true;
MicroTask.wakeTask(this);
Expand Down Expand Up @@ -603,7 +603,11 @@ void EvseManager::setMaxConfiguredCurrent(long amps)

bool EvseManager::isRapiCommandBlocked(String rapi)
{
return rapi.startsWith("$ST");
#ifdef ENABLE_FULL_RAPI
return false;
#else
return !rapi.startsWith("$G");
#endif
}

bool EvseManager::serializeClaims(DynamicJsonDocument &doc)
Expand Down

0 comments on commit 888c5c4

Please sign in to comment.