This function push the last address of the array 'addresses[]' into removedAddresses[] instead of the removing address.
the removedAddresses[] is **removedAddresses**: (address[]) An array of addresses that were previously associated with the profile but have since been removed. as stated in EthosProfile.md
Root Cause
The functions correctly updates the mappings but push the wrong address into the 'removedAddress[]'. Line 591
Jovial Tan Donkey
Low/Info
Wrong storage of removed addresses in EthosProfile causes confusion.
Summary
When deleting a registered address from a profile via deleteAddressAtIndex(), the function calls _deleteAddressAtIndexFromArray() to update the mappings in storage.
This function push the last address of the array 'addresses[]' into
removedAddresses[]
instead of the removing address.the
removedAddresses[]
is**removedAddresses**: (address[]) An array of addresses that were previously associated with the profile but have since been removed.
as stated in EthosProfile.mdRoot Cause
The functions correctly updates the mappings but push the wrong address into the 'removedAddress[]'. Line 591
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
This will cause users or other protocols to wrongly think an address associated with a profile is no longer associated.
PoC
No response
Mitigation
No response