farcasterxyz / contracts

Implementation of the Farcaster contracts
https://www.farcaster.xyz/
MIT License
340 stars 122 forks source link

review: registration of key on fid 0 #272

Closed daejunpark closed 1 year ago

daejunpark commented 1 year ago

The current KeyRegistry.add() function does not prevent regular users from adding a key for fid 0.

It is recommended to make add() to revert when fid == 0, especially if such a key for fid 0 could potentially be exploited in the offchain logic (or in the future).

horsefacts commented 1 year ago

Closing this as hubs ignore the zero fid. See discussion in #279.