Blocked Kiwi Farms, added explanation in README.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2019-07-14 17:59:12 +02:00
parent 9b0c68f2bf
commit dbce486c9b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 9 additions and 1 deletions

View File

@ -479,6 +479,13 @@ strings and you can use unsupported fields in an `Entity` by converting it to
** [ ] Source
** [ ] Notification
== Blocked instances
Instances that exist mainly to hurt people are blocked from using this library.
.List of blocked instances:
* https://en.wikipedia.org/wiki/Gab_(social_network)[Gab]
* https://en.wikipedia.org/wiki/Kiwi_Farms[Kiwi Farms]
== Copyright

View File

@ -40,8 +40,9 @@ API::API(const string &instance, const string &access_token)
{
bool fash = false;
const std::regex re_gab("(?:\\.|^)gab\\.[^\\.]+$");
const std::regex re_kiwifarms("(?:\\.|^)kiwifarms\\.[^\\.]+$");
for (const std::regex &re : { re_gab })
for (const std::regex &re : { re_gab, re_kiwifarms })
{
if (std::regex_search(_instance, re))
{