From f0cb2709720d9fb984c9c342bd68aecb6f856461 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 6 Jun 2023 20:03:24 +0100 Subject: [PATCH] Add a stupid quiz question We have been getting a lot of stupid password requests. --- bcp5-registry.pl | 8 ++++++++ template.html | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/bcp5-registry.pl b/bcp5-registry.pl index 3e9b2f6..a1542e9 100755 --- a/bcp5-registry.pl +++ b/bcp5-registry.pl @@ -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(); diff --git a/template.html b/template.html index ef76425..7fadf1b 100644 --- a/template.html +++ b/template.html @@ -397,6 +397,14 @@ a recent notification of your password, you should request a current password:

+Quiz question vs. stupid robots: +
+Q. Which IETF document, +titled "Address Allocation for Private Internets", +does the G-RIN help implement? +
+A. +

(The password will be sent to the registered email address for the entry.) -- 2.30.2