Blocked Kiwi Farms, added explanation in README.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9b0c68f2bf
commit
dbce486c9b
|
@ -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
|
||||
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Reference in New Issue