The set_secret
function is intended to can only be used by the Owner, but any user instead can use the set_secret
function.
Likelihood:
The user can always use the set_secret
function
Impact:
As the Vault is only created for the signer, the owner's secret is not replaced by another user's secret, but the function of the protocol is disrupted as it only meant for the owner to use it.
Write the following test function on secret_vault.move
:
Make sure that only owner can use the set_secret
function, by using the assert!(bool, u64)
function that it will revert if it's not the owner.
In Move for Aptos, the term "owner" refers to a signer, which is a verified account that owns a given resource, has permission to add resources and the ability to grant access or modify digital assets. Following this logic in this contest, the owner is the account that owns `Vault`. This means that anyone has right to call `set_secret` and then to own the `Vault` and to retrieve the secret from the `Vault` in `get_secret` function. Therefore, this group is invalid, because the expected behavior is anyone to call the `set_secret` function.
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.