Damus
Random Penguin profile picture
Random Penguin
@Random Penguin
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 addon settings should be doing the sanitizing ahead of using pConfig()->set() or config()->set()? If so, is there already a Friendica method for doing that? I made a couple add-ons that have text fields on their settings pages and I wouldn't want anyone to be able to save malicious code into the database with them.
1
hypolite · 4w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqjyfhtfwc40hrc7pxrxvp5ztve3nz4lc4yrxguq2saxpycwmre78q6m9q72 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 wil...