Solve a room's SHA-256 CAPTCHA without the host #11
Loading…
Reference in a new issue
No description provided.
Delete branch "asxpi/libtacky:feat/muc-pow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A room behind XEP-0158 holds our join until its challenge is answered.
libtacky already hands that challenge to the host as , but a
proof of work needs no person, and a host that shows nothing for it
leaves the join hanging until it times out.
When a room we are joining (muc IsJoining) sends a challenge whose form
names our occupant JID and offers SHA-256 with a label of at most six
hex digits, solve it in slices on the event loop and submit only the
proof of work, leaving out the image, question and ejabberd fallback
fields. Give up after 60 seconds, or on a refused answer, and fall back
to for any image the form had. Challenges from anyone else
still go to the host untouched.
The hashcash loop moves out of register.tcl into hashcash.tcl, so
registration and rooms share one solver. No wire method or event
changes.
Tested: tests/client/test_captcha.tcl 30/30 (16 new); the full suite
has one OMEMO failure that also fails on develop.
Part of a proof of concept across anotherim-server, libtacky and anotherim-js (branch
feat/muc-powin each). Each part is tested on its own; not yet run end to end.🤖 Generated with Claude Code
Thanks for this. In the meantime the same feature landed in 1.1.16 and was hardened in 1.1.17: the solve stops when the join ends, one solve per room, and the prefix size is capped. So this branch now conflicts and is superseded, and I'm closing it.
You did two things that develop does not, and we'll take them over in a small follow-up on develop, with credit:
frommust be the room we are joining (otherwise a room could get us to solve someone else's registration proof of work);-acc/-chatcase is not normalized (RFC 7622) #19Pull request closed