a different key called [name] is used instead of [org] for providing logical code, the problem however is that if depthTreelimit were to be updated it should update both the [name] & the [org], but since updateDepthTreeLimit specifically only updates depthTreelimit[org], [name] will not be updated.
This will lead to inconsistencies inside the contract and possible errors whenever depths are checked
Github username: @whoismxuse Twitter username: -- Submission hash (on-chain): 0x45a712b149b87a6ef2194349dc213ab14a02bdaed9385f6d2a4f979d0d19bf34 Severity: medium
Description: inside
PalmeraModule.sol
depthTreeLimit[org]
can be updated by calling the following function:note that
depthTreeLimit[org]
specifically, is updated.In another place inside the contract
depthTreeLimit[name]
exists:a different key called
[name]
is used instead of[org]
for providing logical code, the problem however is that ifdepthTreelimit
were to be updated it should update both the[name]
& the[org]
, but sinceupdateDepthTreeLimit
specifically only updatesdepthTreelimit[org]
,[name]
will not be updated.This will lead to inconsistencies inside the contract and possible errors whenever depths are checked
Recommendation
use the same key values