-
- Notifications
You must be signed in to change notification settings - Fork 6.2k
Add option to enable CAPTCHA validation for login #21638
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
Changes from 8 commits
Commits
Show all changes
28 commits Select commit Hold shift + click to select a range
ad92a8e Allow to enable CAPTCHA validation for login
f3cef9c fix some stupid things
11dc7ef as per KN4CK3R
zeripath c6da162 Merge remote-tracking branch 'origin/main' into REQUIRE_CAPTCHA_FOR_L…
zeripath 3d70bc9 Consolidate CAPTCHA set-up and verification code
zeripath 6ad5f14 fix type
9c2351f Merge pull request #1 from zeripath/patch-21638-captcha-for-login
d02b04f Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
b839e86 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 86a2bd3 CAPTCHA response field should be private variables
674847d Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
12f07ec Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 66c458f Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 7569531 Update modules/context/captcha.go
34125ae Update modules/context/captcha.go
1774038 Add comment to CAPTCHA filed <label></label>
7c676d0 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
cc7d1c4 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny b7700ba Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny ced03dd Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny ebe6456 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 7e19272 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 9a09578 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 9d93336 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny c0b1133 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 7033873 Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny c9d235d Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny 1eb6e2e Merge branch 'main' into REQUIRE_CAPTCHA_FOR_LOGIN
lunny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| {{if .EnableCaptcha}}{{if eq .CaptchaType "image"}} | ||
| <div class="inline field"> | ||
| <label></label> | ||
This conversation was marked as resolved. Outdated Show resolved Hide resolved | ||
| {{.Captcha.CreateHTML}} | ||
| </div> | ||
| <div class="required inline field {{if .Err_Captcha}}error{{end}}"> | ||
| <label for="captcha">{{.locale.Tr "captcha"}}</label> | ||
| <input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off"> | ||
| </div> | ||
| {{else if eq .CaptchaType "recaptcha"}} | ||
| <div class="inline field required"> | ||
| <div class="g-recaptcha" data-sitekey="{{.RecaptchaSitekey}}"></div> | ||
| </div> | ||
| {{else if eq .CaptchaType "hcaptcha"}} | ||
| <div class="inline field required"> | ||
| <div class="h-captcha" data-sitekey="{{.HcaptchaSitekey}}"></div> | ||
| </div> | ||
| {{else if eq .CaptchaType "mcaptcha"}} | ||
| <div class="inline field df ac db-small captcha-field"> | ||
| <span>{{.locale.Tr "captcha"}}</span> | ||
| <div class="border-secondary w-100-small" id="mcaptcha__widget-container" style="width: 50%; height: 5em"></div> | ||
| <div class="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div> | ||
| </div> | ||
| {{end}}{{end}} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.