Description: HorseStore::IS_HAPPY_HORSE
contains HORSE_HAPPY_IF_FED_WITHIN < timestamp - horseFedTimestamp
& timestamp == horseFedTimestamp
conditional checks rather than HORSE_HAPPY_IF_FED_WITHIN >= timestamp - horseFedTimestamp
check .This means that the HorseStore::IS_HAPPY_HORSE
function will always return false if it's not called in the same transaction as HorseStore::FEED_HORSE
(or with the same timestamp) or if it's called within the HORSE_HAPPY_IF_FED_WITHIN
(24 hr) period.
Impact: High, If horse X has been fed within the past 24 hours, horse X must be happy.
is an invariant in the system
Proof of Code:
Recommedation:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.