Skip to content

fix(annaabi): name the Cloudflare challenge instead of emitting a bare 403 - #557

Merged
brunolm merged 2 commits into
kaifcodec:mainfrom
brunolm:fix/email-annaabi
Aug 9, 2026
Merged

fix(annaabi): name the Cloudflare challenge instead of emitting a bare 403#557
brunolm merged 2 commits into
kaifcodec:mainfrom
brunolm:fix/email-annaabi

Conversation

@brunolm

@brunolm brunolm commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

The module reported a bare Unexpected response status: 403 for every address, which reads like a module bug. It is a Cloudflare managed challenge — cf-mitigated: challenge on every request, confirmed from two different countries and across httpx, curl_cffi and urllib.

Two changes: the module moves to the impersonating transport, which may be all it needs where the site is reachable, and the challenge is named when it is not.

The verdict logic is verified, not assumed

The challenge was cleared by hand in a real browser and both markers still match exactly:

test@gmail.com              -> "Sellise emailiga kasutaja on juba registreerinud"   taken
admin@annaabi.ee            -> "See email on vaba"                                  free
info@annaabi.ee             -> "See email on vaba"                                  free
xkqpzrmvn4471zzq@gmail.com  -> "See email on vaba"                                  free

So this is a network wall rather than rotted parsing, and the module should work unchanged wherever the site talks to an HTTP client.

Not verified

It has not run end-to-end from here — the challenge is served to every HTTP client regardless of region, so from my locations it returns the named error rather than a verdict. What is verified is the verdict logic, against real server responses captured once the challenge was cleared.

This mirrors #547, which does the same for the user_scan twin.


Depends on #528, whose commit is included here until it merges — review only the module file.

brunolm added 2 commits August 7, 2026 20:21
Every email_scan validator is async, but curl_cffi's session API blocks and
the email orchestrator fans out up to 25 modules on one event loop, so a
direct call would stall every module in flight. Delegates to the existing
impersonate_request in a worker thread, keeping the session cache, cookie
warm-up, proxy rotation and the -t timeout in one place.
…e 403

httpx receives a managed challenge for every request, so the module reported
an unexplained 403. Route it through the impersonating transport, which may
be all it needs where the site is reachable, and name the challenge when it
is not.

The verdict logic itself is verified through a real browser: test@gmail.com
returns the exact taken marker and unregistered addresses the exact free one.
@kaifcodec
kaifcodec requested a review from kristoisberg August 9, 2026 14:07
@kristoisberg

Copy link
Copy Markdown
Collaborator

I investigated these modules a few days ago when they were consistently failing for me too. Impersonation did not help, but now the modules work for me again all of a sudden. I am in favour of the improved error message, but I'm not sure if the impersonation helps at all.

@kaifcodec

Copy link
Copy Markdown
Owner

@kristoisberg if this works for you, like if you are able to get a +ve/-ve hits in this test then it's fine, as I am unable to test it properly because this website is blocked in my region.

Anyways about the impersonation I don't think it matters what is used here, because httpx is brittle in these cases as we saw in all the recent fixes we had to migrate from httpx to curl_cffi but we didn't have to do vice versa. So I think using impersonation is just being safe!

@brunolm brunolm added the bug fix Fixed a bug in existing files label Aug 9, 2026
@brunolm
brunolm merged commit e9693c8 into kaifcodec:main Aug 9, 2026
2 checks passed
@brunolm
brunolm deleted the fix/email-annaabi branch August 9, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Fixed a bug in existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants