Browse Source
Fix the link to the Signal CAPTCHA form
pull/721/head
Pēteris Caune
1 year ago
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with
4 additions and
4 deletions
-
hc/api/models.py
-
templates/front/signal_captcha.html
|
|
@ -601,13 +601,12 @@ class Channel(models.Model): |
|
|
|
message = f"Challenge token: {challenge}" |
|
|
|
hostname = socket.gethostname() |
|
|
|
submit_url = settings.SITE_ROOT + reverse("hc-signal-captcha") |
|
|
|
submit_url += urlencode({"host": hostname, "challenge": challenge}) |
|
|
|
submit_url += "?" + urlencode({"host": hostname, "challenge": challenge}) |
|
|
|
html_message = f""" |
|
|
|
On host <b>{hostname}</b>, run:<br> |
|
|
|
<pre>manage.py submitchallenge {challenge} CAPTCHA-SOLUTION-HERE</pre><br> |
|
|
|
<br> |
|
|
|
Alternatively, submit CAPTCHA solution here: <br> |
|
|
|
{submit_url}<br> |
|
|
|
Alternatively, <a href="{submit_url}">submit CAPTCHA solution here</a>.<br> |
|
|
|
<br> |
|
|
|
Message from Signal:<br> |
|
|
|
<pre>{raw}</pre> |
|
|
|
|
|
@ -20,8 +20,9 @@ |
|
|
|
<form method="post"> |
|
|
|
{% csrf_token %} |
|
|
|
<div class="form-group"> |
|
|
|
<label for="captcha">Challenge</label> |
|
|
|
<label for="challenge">Challenge</label> |
|
|
|
<input |
|
|
|
id="challenge" |
|
|
|
name="challenge" |
|
|
|
required |
|
|
|
class="form-control" |
|
|
|