FChannel0 / FChannel-Server

GNU Affero General Public License v3.0
106 stars 14 forks source link

Trim strings before firing getactor requests #62

Closed ghost closed 2 years ago

ghost commented 2 years ago

The ideal solution to this problem would have been to properly sanitize input so that admins couldn't accidentally put trailing/leading spaces in URLs to follow, but this is in production now and FChannel doesn't have any system for database migration/versioning. So instead we can just sanitize it in the http.NewRequest to avoid a panic. Other instances of http.NewRequest that use user input could probably benefit from this too but I didn't want to go off the rails and break anything without a test suite.

Fix for issue #58

FChannel0 commented 2 years ago

thank you for this cleanup.