Damus
Random Penguin · 3w
I've been looking though the source code and when you set an option it looks like no sanitization is done? I see serialization of arrays and everything else is cast to type string. So theme and addo...
hypolite profile picture
@Random Penguin Code is only malicious when it's retrieved and displayed. This is why all template variables are escaped by default. This way even malicious HTML/Javascript entered into config files will be displayed as is in a template variable interpolation.

Malicious code is harmless in the database itself. Malicious code that would targets the database like SQL injection is handled separately by using bound variables during requests, so no user-supplied values (or any other, for that matter) is ever treated as part of the query itself.

Sanitization is a neverending whack-a-mole game while blanket escaping and SQL bound variables are once and done solutions.
1
Random Penguin · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqtx0flkxr6amckrkpzz92apurckfxgtcnzm4h747wlq72dakzmaqsn520kn I wasn't really thinking about SQL injection, I was thinking about malicious JS code getting written to the front-end and executed by an add-on that just uses a hook that injects it some...