The secret_vault::get_secret
is build as follow
The function takes a public address as a parameter and then check if the address is the owner, if it is true then gives the secret, but the problem is that anyone can put the owner public address if they know it as it is public in the blockchain contrary to the private key.
It breaks the following invariant : Only the owner should be able to store a secret and then retrieve it later. Others should not be able to access the secret.
The secret is no more secret.
add the following test in secret_vault.move
Instead of using an address
as parameter use &signer
it will directly put the caller of the function as the parameter and then check if it is the owner.
remove the #[view]
and add the following lines to the function secret_vault::get_secret
:
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.