scrazzz / redgifs

Simple Python API wrapper for the RedGIFs API
https://redgifs.rtfd.io
MIT License
93 stars 13 forks source link

Strip IP address from errors #13

Closed scrazzz closed 1 year ago

scrazzz commented 1 year ago

Summary

This PR prevents anyone using this library from getting their IP address leaked due to error messages.

Some background

Someone reported an issue on this repository but they didn't read the error properly. This error contained a redgifs url which has their IP address.

Why this may be an issue

  1. On Discord bots, when an error occurs it normally prints the error to stderr. But in same cases, the bot devs would like to send the error in the Discord server so that other users understand what the error is. But this causes an issue as the IP address of the host gets leaked.

  2. New users who use this library may not read the full error. As a result, they may unknowingly post the error (along with their IP) on websites such as StackOverflow to ask for help.