-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
We should validate attachment_kind as well here, i.e.:
And looking at the neighboring extract_sender_from_metadata, it doesn't validate the account ID which it probably should also do. Would you mind adding a account_id::validate line there and add a Panics if section? If not, lmk and I'll open an issue or address it.
In general, I think the procedures we provide should provide as much safety as they can and if users want to work with potentially invalid metadata, they likely know what they're doing and can write their own procedures. But for 95% of users, validation should be the safer option.
Originally posted by @PhilippGackstatter in #2338 (comment)
TODOs:
- add
account_id::validatecheck toextract_sender_from_metadata - check that attachment kind is valid, like
output_note.masmdoes it - add
Panicssection to the docs of both procedures
Reactions are currently unavailable
Metadata
Metadata
Labels
No labels