Damus
Graham Sutherland / Polynomial · 4w
protip: ALWAYS use regular expression literals in JavaScript and TypeScript and any other language that supports it, instead of writing your regex out in a string. I cannot count how many critical sec...
Graham Sutherland / Polynomial profile picture
this doesn't just come up in domain name whitelisting, it's eeeeverrryyywhere. the double escapes ALWAYS catch people out. use the regex literals, they'll save your ass. and if your language or toolchain or linter has a strict mode that can yell at you about bogus escape sequences in strings (or in regex literals too, for that matter) then turn it on and turn it up to 11.
1
Richard "RichiH" Hartmann · 4w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq7wkkj73azdfr23hmgd07fn0h39xvy0w72garahk5p8hg8jv8dx5s9v3tsk side note, allowlist and blocklist are better words