Skip to content

Commit 888c5c4

Browse files
authored
Merge pull request #702 from OpenEVSE/jeremypoulter/issue643
Block all RAPI commands that are not the read only `$G...` ones
2 parents 0dd3cc7 + d636dd7 commit 888c5c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/evse_man.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ bool EvseManager::claim(EvseClient client, int priority, EvseProperties &target)
423423
{
424424
DBUGF("Found slot");
425425
if(slot->claim(client, priority, target))
426-
{
426+
{
427427
DBUGF("Claim added/updated, waking task");
428428
_evaluateClaims = true;
429429
MicroTask.wakeTask(this);
@@ -603,7 +603,11 @@ void EvseManager::setMaxConfiguredCurrent(long amps)
603603

604604
bool EvseManager::isRapiCommandBlocked(String rapi)
605605
{
606-
return rapi.startsWith("$ST");
606+
#ifdef ENABLE_FULL_RAPI
607+
return false;
608+
#else
609+
return !rapi.startsWith("$G");
610+
#endif
607611
}
608612

609613
bool EvseManager::serializeClaims(DynamicJsonDocument &doc)

0 commit comments

Comments
 (0)