Bot Protect Break Phone Apps #1319
|
Hello! I'm using Safeline with great satisfaction, i just want to know if there is a way to avoid phone apps to break when configuring them with Bot Protect (like Paperless, as soon i turn on Bot Protection the app cannot connect to the service) Thanks! |
Replies: 1 comment 2 replies
|
Yes: the app is not failing the challenge, it never gets to take it, and the Bot Protect dialog of the application has a condition for exactly this case. With Anti-Bot Challenge on, every request that has not passed the challenge yet gets HTTP 468 with the challenge page, about 15 KB of HTML, whatever the path or the User-Agent. A browser runs that page's script and comes back with a cookie. An app that expects JSON from The fix is in the same dialog where the challenge was turned on. Applications, the app's card, BOT Protect: once Anti-Bot Challenge is checked, a "Challenge Conditions" checkbox appears. Tick it, pick "Skip challenge when the condition is met", and add Match Target "URL Path", Operator "Starts With", Content Measured after saving, same 9.4.1:
The web UI is not affected: the browser still takes the challenge on the first page load, and the API stays behind Paperless's own login, since the challenge was never authentication. Attack detection stays on for the skipped requests too: an SQL injection probe sent to If you would rather not skip the challenge for the whole API, the app can identify itself instead. Paperless Mobile's login form has "Additional Headers", sent with every request, so add one there, say A global Allow rule (Allow & Deny, Custom Rules, Whitelist, Add rules, Allow) matching the client also lets the app through, but an allow rule skips attack detection as well: the same injection probe reached the upstream with a 200 under one, created with "Continue to detect and log attack requests even when whitelisting." left unticked, which is the default. The per-application condition only skips the challenge, which is why I would start there. |
Yes: the app is not failing the challenge, it never gets to take it, and the Bot Protect dialog of the application has a condition for exactly this case.
With Anti-Bot Challenge on, every request that has not passed the challenge yet gets HTTP 468 with the challenge page, about 15 KB of HTML, whatever the path or the User-Agent. A browser runs that page's script and comes back with a cookie. An app that expects JSON from
/api/...gets HTML with status 468 instead and reports that it cannot connect. Measured on SafeLine 9.4.1 with a test upstream behind it.The fix is in the same dialog where the challenge was turned on. Applications, the app's card, BOT Protect: once Anti-Bot Challenge is…