When decoding the weather data from Chainlink Functions, there is no validation that the received value corresponds to a valid Weather enum value. If the Functions response contains an invalid value, it could be cast to an invalid enum state, potentially causing unexpected behavior.
Likelihood:
Medium likelihood.
Impact:
Medium impact.
Add validation to ensure the decoded weather value is within the valid range for the Weather enum:
The implementation to get the current weather is written in `GetWeather.js`. The `weather_enum` will be always in the expected range.
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.