pulsar-edit / package-backend

Pulsar Server Backend for Packages
https://api.pulsar-edit.dev
MIT License
11 stars 11 forks source link

Improve Log Injection Checks #139

Closed confused-Techie closed 1 year ago

confused-Techie commented 1 year ago

Requirements

Description of the Change

This PR changes how we check for simple log injection.

Previously we would only sanitize logs right before logging them, and would escape any processing if it wasn't a string. Instead these changes now preform sanitizing on the exact user input values being added to a log, and additionally if a value that is not a string is found, we convert it to a string then sanitize anyway. This way we can ensure nothing slips past this check.