cancelRequest function does not verify whether the cancellation process has been properly initiated before allowing the cancellation to be completed. And anyone can call the function.
According to the Starknet documentation, the startRequestCancellation
function should be called first, followed by a waiting period, before the cancelRequest
function can be executed. This crucial step is not being checked in the current implementation.
https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/
Here's the current implementation
The cancelRequest
function does not check whether the cancellation process has been initiated using the startRequestCancellation
function. It also doesn't verify if the required waiting period has elapsed.
Besides, anyone can call the function.
By the design of Starknet, calling callingRequest() directly would fail without the proper initial processes. Also, anyone can call cancelRequest() even if they are not the owner of the token sought to be cancelled.
Manual review
Add checks in the cancelRequest
function to ensure the proper cancellation process is followed.
The process to cancel a message is detailed here: https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/#l2-l1_message_cancellation Since `startRequestCancellation` has the `onlyOwner`, only the owner can begin that process.
The process to cancel a message is detailed here: https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/#l2-l1_message_cancellation Since `startRequestCancellation` has the `onlyOwner`, only the owner can begin that process.
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.