anubis: "invalid response." after "Success!" in Chromium

Hi, thank you very much for Anubis!

I’ve just set it up for two websites on the same server:

  • https://wiki.dlang.org/ - works perfectly.
  • https://dsource.org/ :
    • In Firefox: works perfectly.
    • In Chomium: In a new private window, I see, in quick succession:
      1. “Making sure you’re not a bot”
      2. “Success!”
      3. “Oh noes!” / “invalid response”
        • On this page, nothing happens if I click “Try again”, but clicking “Go home” results in a “Success!” and successful website load.

Any idea what could be the problem?

Installed from anubis_1.18.0_amd64.deb. Browser versions:

  • Firefox 136.0.3
  • Chromium 134.0.6998.165

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Okay, I have a complete rewrite of the challenge creation flow in #749. I think my core assumptions about browsers work with regards to how challenges were created is fundamentally incorrect. I assumed that my challenge creation method was idempotent, or that a single client hitting that route at time t0 to get string s0 would also get string s0 when hitting that route at time t1. This is apparently false and instead of fighting windmills trying to figure out why, I changed this to use a completely different flow.

Now Anubis generates a new challenge string based on 256 bytes of cryptographically random data. Anubis stores metadata about challenges (including the challenge string) in a Store. Right now the only Store is a simple in-memory data structure based on decaymap. Before that PR merges, I will add storage backends for the following:

  • bbolt, an embedded key/value store for Go programs
  • valkey, the community fork of Redis

In addition, I think part of the reason this is stinging so bad is that there is a core UX flaw with this approach: the “success” screen doesn’t actually mean “server accepted challenge”, it means “client found a solution”. I made #745 to remove that as a stopgap.

Hopefully this will stop the bleeding.

Thank you for bearing with me.

The root cause has been fixed in #711. This fix will be out in v1.20.0 soon.

I think I have finally fixed this bug for good in #749.

If you use Anubis via Docker, please update to ghcr.io/techarohq/anubis:main. Please be sure to add a docker volume for persistent storage on the disk mounted to /data and add the following to your configuration/policy file:

store:
  backend: bbolt
  parameters:
    path: /data/anubis.bdb

If you use Docker compose, the end result could look like this:

services:
  anubis:
    image: ghcr.io/techarohq/anubis:main
    pull_policy: always
    environment:
      BIND: ":8080"
      METRICS_BIND: ":9090"
      SERVE_ROBOTS_TXT: "true"
      TARGET: "http://nginx"
      POLICY_FNAME: "/data/cfg/botPolicy.yaml"
      OG_PASSTHROUGH: "true"
      OG_EXPIRY_TIME: "24h"
    ports:
      - 8080:8080
    volumes:
      - "./botPolicy.yaml:/data/cfg/botPolicy.yaml:ro"
      - "anubis-data:/data"
  nginx:
    image: nginx
    volumes:
      - "./www:/usr/share/nginx/html"

volumes:
  anubis-data:

If this fixes the issue, I’m going to tag Anubis v1.21.0 this weekend. If not, comment here with information so we can all suffer together.

I am sorry to report that the problem seems to be still there, chrome (ipv6) and firefox (ipv4)

GET https://REMOVED

# returns 200
# set-cookie
techaro.lol-anubis-auth=; Path=/; Expires=Sun, 29 Jun 2025 11:46:41 GMT; Max-Age=0; SameSite=Lax
# set-cookie
techaro.lol-anubis-cookie-test-if-you-block-this-anubis-wont-work=af9a16f77159805; Path=/; Expires=Sun, 29 Jun 2025 12:17:41 GMT

GET https://REMOVED/.within.website/x/cmd/anubis/api/pass-challenge?response=00df117f2aea881e623fe8c30fdc9ce907e50106469fd713657c0d8cacd52884&nonce=88&redir=REMOVED&elapsedTime=11
# retusns 403