Argument uint256 profileId of EthosAttestation.sol:createAttestation() is useless
Summary
EthosAttestation.sol:createAttestation() accepts the argument profileId but the profile owner is the only one who can send Attestations, therefore profileId can always be inferred from msg.sender
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Could potentially lead to create attestations for other profiles
Acrobatic Burlap Lizard
Low/Info
Argument
uint256 profileId
of EthosAttestation.sol:createAttestation() is uselessSummary
EthosAttestation.sol:createAttestation()
accepts the argument profileId but the profile owner is the only one who can send Attestations, thereforeprofileId
can always be inferred frommsg.sender
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Could potentially lead to create attestations for other profiles
PoC
apply the following patch:
Mitigation
profileId
can be removed from function's arguments and retrieved from EthosProfile:Note that applying the patch some tests breaks but because those tests are not relevant