Skip to content
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

Add support mCaptcha as captcha provider #20458

Merged
merged 32 commits into from
Aug 10, 2022
Merged

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Jul 22, 2022

  • There's a deep motivation for this pull request that requires some explanation(feel free to skip reading this). In recent events, it was once again pointed out that Codeberg is using a captcha that isn't accessible to blind and visually impaired people, currently Gitea doesn't offer a captcha that is accessible to those kind of people. After a public meeting was hold by Codeberg to discuss the issue and look into solutions, I came to a conclusion that mCaptcha is a good solution to solve Codeberg's accessibility problem. So therefor this PR.
  • This PR adds a fourth captcha type, mCaptcha. It uses a small library to interact with the mCaptcha instance. The javascript code uses the official glue code (vanilla-variant) provided by mCaptcha themselves. The remaining code is basically boilerplate that also exists for the other captchas.

@Gusted Gusted added this to the 1.18.0 milestone Jul 22, 2022
@Gusted Gusted added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 22, 2022
@Gusted Gusted requested a review from 6543 July 22, 2022 22:07
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 22, 2022
package.json Outdated Show resolved Hide resolved
Gusted and others added 2 commits July 23, 2022 21:39
Co-authored-by: silverwind <me@silverwind.io>
@zeripath
Copy link
Contributor

zeripath commented Jul 24, 2022

I don't understand though... I thought the point of mCaptcha was that it was supposed to be a drop-in replacement for recaptcha/hcaptcha?

Can't you just put an mCaptcha url in as the recaptcha url?


xCaptcha drop-in replacement

Already using a captcha solution? No worries, our APIs are compatible with reCaptcha and hCaptcha!

@zeripath
Copy link
Contributor

If not can we change our recaptcha and/or hcaptcha modules to make them a little more configurable so that they could handle mCaptcha or whatever other captcha solution comes in the future?

@realaravinth
Copy link
Contributor

I don't understand though... I thought the point of mCaptcha was that it was supposed to be a drop-in replacement for recaptcha/hcaptcha?

Can't you just put an mCaptcha url in as the recaptcha url?

xCaptcha drop-in replacement

Already using a captcha solution? No worries, our APIs are compatible with reCaptcha and hCaptcha!

The website is out of date. I started out with the goal of building an identitical interface but hCaptcha and reCAPTCHA APIs have attributes that are irrelevant for mCaptcha.

Current interface is similar but not identitical. Will update the website this week.

@codecov-commenter

This comment was marked as off-topic.

6543 and others added 3 commits July 26, 2022 14:20
Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
- Still requires patch on mCaptcha's side to provide good iframe
settings & good CSS on widget HTML.
@Gusted
Copy link
Contributor Author

Gusted commented Jul 26, 2022

Blocked by mCaptcha/glue#12 & mCaptcha/mCaptcha#35

@Gusted
Copy link
Contributor Author

Gusted commented Jul 28, 2022

PRs are merged on mCaptcha. c866103 + 0789b33 fixes the issue on mobile.

@Gusted Gusted removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jul 29, 2022
@Gusted Gusted requested a review from 6543 July 29, 2022 19:05
package.json Outdated Show resolved Hide resolved
@Gusted Gusted requested a review from delvh August 9, 2022 19:59
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 10, 2022
@6543 6543 merged commit 58de07e into go-gitea:main Aug 10, 2022
@6543 6543 changed the title Integrate with mCaptcha Add support mCaptcha as captcha provider Aug 10, 2022
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this pull request Aug 10, 2022
https://mcaptcha.org/

Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 10, 2022
* giteaofficial/main:
  Use separate class for tippy targets (go-gitea#20742)
  Add support mCaptcha as captcha provider (go-gitea#20458)
@Gusted Gusted deleted the add-mcaptcha branch August 11, 2022 21:48
@go-gitea go-gitea deleted a comment from cryptoroland Aug 14, 2022
@go-gitea go-gitea locked as spam and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants