1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-04 03:56:24 -07:00

Add basic captcha support

This commit is contained in:
Eggbertx 2019-11-24 14:42:39 -08:00
parent 9a247cc7b2
commit 21e01d7708
15 changed files with 292 additions and 46 deletions

18
templates/captcha.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>Gochan CAPTCHA</title>
</head>
<body>
{{with .Result}}{{$.Result}}{{end}}
<form action="/captcha" method="POST">
<img src="{{.Base64String}}" /><br />
<input type="text" name="captchaanswer" autocomplete="off" />
<input type="hidden" name="captchaid" value="{{.CaptchaID}}" />
{{with .EmailCmd}}<input type="hidden" name="emailcmd" value="{{$.EmailCmd}}" />{{end}}
{{with .TempPostIndex}}<input type="hidden" name="temppostindex" value="{{$.TempPostIndex}}" />{{end}}
<input type="submit" value="Submit" /><br />
<input type="submit" name="reload" value="Reload" />
</form>
</body>
</html>