online-judge icon indicating copy to clipboard operation
online-judge copied to clipboard

Add hCaptcha backend as an alternative to reCAPTCHA

Open Jazzzny opened this issue 1 year ago • 2 comments

Screenshot 2024-01-20 at 4 57 08 PM

This PR adds support for an hCaptcha backend powered by django-hcaptcha-field. Most additions are duplicated from the existing reCAPTCHA backend as the hCaptcha package is very similar.

See https://blog.cloudflare.com/moving-from-recaptcha-to-hcaptcha for possible benefits over reCAPTCHA.

Jazzzny avatar Jan 20 '24 22:01 Jazzzny

Codecov Report

Attention: Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.

Project coverage is 47.76%. Comparing base (fd7fb05) to head (7ef055d). Report is 61 commits behind head on master.

Files with missing lines Patch % Lines
judge/utils/captcha.py 76.47% 4 Missing :warning:
judge/views/register.py 33.33% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2312      +/-   ##
==========================================
+ Coverage   46.76%   47.76%   +0.99%     
==========================================
  Files         251      259       +8     
  Lines       13317    13716     +399     
==========================================
+ Hits         6228     6551     +323     
- Misses       7089     7165      +76     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Dec 31 '24 03:12 codecov-commenter

Ready for review. Only one backend can ever be active at a given time, however that seems logical.

Jazzzny avatar Dec 31 '24 03:12 Jazzzny