khoadng / Boorusama

A mobile client for booru sites built with Flutter
GNU General Public License v3.0
147 stars 8 forks source link

Access Blocked by Cloudflare WAF #147

Closed ximellon closed 1 year ago

ximellon commented 1 year ago

Due to heavy load from certain area, e.g. Asia, danbooru site's admin has turned on WAF (Web Application Firewall) as a solution to non-human accesses. But this also affects third-party apps' normal workflow. For example, in Boorusama, it'll report Something went wrong and stop working. Glad that other apps' developers have solved this problem:

Hope you can add this exception handling to this app, which, in my opinion, is the best app for accessing danbooru by far.

khoadng commented 1 year ago

Thanks for reporting this issue. I'll take a look.

khoadng commented 1 year ago

Could you tell me the steps to reproduce this problem?

ximellon commented 1 year ago

https://github.com/flexbooru/flexbooru/issues/200

Here are the details that I previously left on Flexbooru. Hope this would help you reproduce this problem.

khoadng commented 1 year ago

@ximellon I can reproduce it by changing my IP to Japan yesterday. But the problem seems to go away today for some reason. I don't know if Danbooru removes the Cloudfare layer or not.

Could you help me verify if the app is working on your side?

ximellon commented 1 year ago

Yes. It did work normally now. But WAF did exist when I access Danbooru this morning, which is about 10 hours ago. I think it might not completely gone since when I started to use Boorusama, like 1 month ago, it did work without any problem. However, as I read from forum of Danbooru, WAF should have been enabled for months (pretty sure they added it in the first half of this year to reduce crwalers' accesses for AI drawing training). And on the next day, BOOM, this error stared to bother me until now. So it might depends on some condition setup, somtimes WAF just thinks you are harmless. I believe it's temporary and I'll report at this thread when I meet WAF next time.

BTW, I go out with Taiwan IP.

khoadng commented 1 year ago

I see usually these kind of errors are pretty hard to fix if you can't reproduce it consistently. For now, I will try to make some changes to show a specific error message instead of a general unhelpful one.

khoadng commented 1 year ago
untitled

@ximellon So this is the reason why Japan IP got hit with WAF, does Taiwan IP still having issues?

ximellon commented 1 year ago

Nope. Totally fine today as well. Guess they treated us as a whole region. Or maybe all apps share the same internal cookie and this problem fixed by Flexbooru (I used it before)?

khoadng commented 1 year ago

maybe all apps share the same internal cookie

I don't think this would be the case since it is a major privacy violation to have this kind of data shared between apps.

I guess Danbooru admins not only removed restrictions for Japan but some other countries as well, but they didn't mention it.

Anyway, I will close this issue for the time being, feel free to reopen it if they add WAF again.