Ron Stoner on Nostr: The “develop” branch of nostr-irc now protects you from accidentally posting your ...
The “develop” branch of nostr-irc now protects you from accidentally posting your nsec private key. I’ll be merging to master once I have some other features updated. All it took was:
```
if re.search(r'nsec[a-z0-9]{32,64}$', user_input):
messages.addstr("\n *** Error: Potential exposure of nsec private key. Message denied.\n\n”)
```
Magic! 🎩🪄
Published at
2023-03-10 03:43:33 UTCEvent JSON
{
"id": "23f7b0b4d6d00da12c4649da6abd89aef06b30511820e7fd7f148db295e9266c",
"pubkey": "0497384b57b43c107a778870462901bf68e0e8583b32e2816563543c059784a4",
"created_at": 1678419813,
"kind": 1,
"tags": [],
"content": "The “develop” branch of nostr-irc now protects you from accidentally posting your nsec private key. I’ll be merging to master once I have some other features updated. All it took was:\n\n```\nif re.search(r'nsec[a-z0-9]{32,64}$', user_input):\n messages.addstr(\"\\n *** Error: Potential exposure of nsec private key. Message denied.\\n\\n”)\n```\n\nMagic! 🎩🪄",
"sig": "a95f7186ea0eff65c55aef07288965fff9d64d329d1b72b70b12bb54624ae9c962fb13262c12b004a15e65c1506e00118fa07db2070fabfd9ffc5451e9128a8f"
}