Oddbean new post about | logout
 Dearest Nostr devs, if you allow users to edit their profiles and add a Nostr address, could you please add field validation? I continue to see people entering their npub and worse their nsec into this field. I feel sorry for those that burn their nsecs because of a misunderstanding. Thanks. 
 yes/t-y D!        & devs 
 They should do this:

import { NSchema as n } from '@nostrify/nostrify';

const metadata = n.json().pipe(n.metadata()).parse(event.content);

https://nostrify.dev/schema/#kind-0-metadata 
 This is one of the first things I discovered when I started writing code to interact with the Nostr protocol.  Apparently, most clients don't sanitize data. 
 The hubstr.org does that 🥳 
 i second that, nerds, please listen, we need guidance