chiark / gitweb /
Add a stupid quiz question
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 6 Jun 2023 19:03:24 +0000 (20:03 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 6 Jun 2023 19:22:38 +0000 (20:22 +0100)
We have been getting a lot of stupid password requests.

bcp5-registry.pl
template.html

index 3e9b2f6f05b08bb3f6c4cf7ec94b8f50e708835f..a1542e9f1f540eb0e36cc7023cba968e1ceff35b 100755 (executable)
@@ -205,6 +205,14 @@ if ($invokestyle eq 'maintain') {
     
 } elsif (length $in{'mailpasswd'}) {
 
+    if (! $in{'quiz'}) {
+        print "Please answer the quiz question.";
+       exit 0;
+    } elsif ($in{'quiz'} !~ m{^(?:bcp5|rfc1918)$}i) {
+       print "Wrong answer to the quiz question.";
+       exit 0;
+    }
+
     read_database();
     get_entry();
     show_entry();
index ef764259e54e4155e3f0c9fa100529c3319fba3f..7fadf1b91b0d565c95ab75390c93746c7d026d96 100644 (file)
@@ -397,6 +397,14 @@ a recent notification of your password, you should request a current
 password:
 <p>
 
+Quiz question vs. stupid robots:
+<br>
+Q. Which IETF document,
+titled "Address Allocation for Private Internets",
+does the G-RIN help implement?
+<br>
+A. <input type=text name="quiz" length=10>
+<br>
 <input type=submit name="mailpasswd" value="Mail password."><br>
 (The password will be sent to the registered email address for the
 entry.)