latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
692 stars 174 forks source link

throw instead of truncating namespaces #2905

Closed holic closed 3 days ago

holic commented 2 weeks ago

example: https://github.com/latticexyz/mud/blob/e0c9eaaf2990ea031ee3ba98b8560fcfec82889d/packages/common/src/resourceToHex.ts#L20 (there might me more)

namespaces are tied to access control, so it's probably not safe to automatically truncate these, thus changing access control policies, and instead we should just require a <=14 char namespace and throw otherwise