Soulmate::writeMessageInSharedSpace
The function is vulnerable, allowing anybody to write a message to soulmates
who own nextID
0
, which is truly disturbing. Soulmates
with nextID
0
has no protection against, misleading, heartless, messages from any unknown
person.
Please read the comments, i commented out...
Place the following test code snippet into the test/unit/soulmateTest.t.sol file. Put it at the very bottom but before the last closing semicolon }
.
Open Your Bash Terminal
and execute the following command...
Ouput should indicate that test Passed Successfully and the hater ruined the Alice & Bob's relationship successfully.
Anyone with malicious intentions can cause soulmates
to get divorced by composing misleading and heartless messages on behalf of one soulmate to their partner soulmate. The Soulmate::sharedSpace
could be inundated with harmful, heartless, heart-breaking, and threatening messages. Therefore soulmates
who own nextID
0
will always be vulnerable for unexpected, misleading, heartless, disgusting, messages.
Foundry Framework (Solidity, Rust)
There should be an if
check to verify whether the person using the Soulmate::sharedSpace
for writing and sending the message through Soulmate::writeMessageInSharedSpace
function, has a soulmate assigned to their nextID
that they own.
Update the src/Soulmate.sol
file with the following code modifications...
After modifying and updating the Soulmate.sol
file, try to re-execute the test discussed in the Proof of Concept (PoC). It should get reverted with the error Soulmate__DontHaveAnySoulmate(0x0000000000000000000000000000000000000000)
, which may also have one argument of a zero address.
Medium Severity, This has an indirect impact and influence on the possibility of divorce between soulmates owning the first soulmate NFT id0, leading to permanent loss of ability to earn airdrops/staking rewards.
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.