Skip to content

Add Cap Captcha support #2511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2025
Merged

Add Cap Captcha support #2511

merged 2 commits into from
Jun 19, 2025

Conversation

WittF
Copy link
Contributor

@WittF WittF commented Jun 18, 2025

Cap is a modern, lightweight, open-source CAPTCHA alternative using SHA-256 proof-of-work.

  • Add CaptchaCap type constant in types.go
  • Add Cap struct with InstanceURL, KeyID, and KeySecret fields
  • Add CapCaptcha method in provider.go to return Cap settings
  • Add default settings for Cap captcha in setting.go
  • Implement Cap captcha verification logic in middleware
  • Expose Cap captcha settings in site API

This adds support for Cap captcha service as an alternative captcha option alongside existing reCAPTCHA, Turnstile and built-in captcha options.

- Add CaptchaCap type constant in types.go
- Add Cap struct with InstanceURL, KeyID, and KeySecret fields
- Add CapCaptcha method in provider.go to return Cap settings
- Add default settings for Cap captcha in setting.go
- Implement Cap captcha verification logic in middleware
- Expose Cap captcha settings in site API

This adds support for Cap captcha service as an alternative
captcha option alongside existing reCAPTCHA, Turnstile and
built-in captcha options.
@CLAassistant
Copy link

CLAassistant commented Jun 18, 2025

CLA assistant check
All committers have signed the CLA.

@WittF
Copy link
Contributor Author

WittF commented Jun 18, 2025

Github: https://github.com/tiagorangel1/cap/
Docs: https://capjs.js.org/
if needed, I can provide my Cap server for testing

@WittF
Copy link
Contributor Author

WittF commented Jun 18, 2025

Regarding the frontend repo, a lot of the code for captcha is marked as
This file is part of Cloudreve Pro edition source code
🫥How should I submit them

@HFO4
Copy link
Member

HFO4 commented Jun 18, 2025

Regarding the frontend repo, a lot of the code for captcha is marked as This file is part of Cloudreve Pro edition source code 🫥How should I submit them

This comment is only presented in source code from pro edition, please make changes based on the community repo.

@WittF
Copy link
Contributor Author

WittF commented Jun 18, 2025

cloudreve/frontend#260

@WittF WittF marked this pull request as ready for review June 18, 2025 11:07
@HFO4 HFO4 merged commit 9f9796f into cloudreve:master Jun 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants