librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.11k stars 202 forks source link

fix: Squish down error message that may contain an entire webpage #3263

Closed macowie closed 10 months ago

macowie commented 10 months ago

The bitbucket gem returns the response body as the error message, which may be a big blob of webpage source. This strips out non-word characters as a means to brute force sanitize it for the structured logging json.