Turn the entered code uppercase before looking it up in the database,
to permit entering the code in lowercase (since the generator doesn't generate lowercase letters). Use a relative url to querypr-code.cgi so that mirrors (and test boxes) can use the query-pr cgis unmodified.
This commit is contained in:
parent
22cb43132c
commit
a7613f7a01
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=26358
2 changed files with 6 additions and 4 deletions
|
|
@ -8,7 +8,7 @@
|
|||
# GNU General Public License Version 2.
|
||||
# (http://www.gnu.ai.mit.edu/copyleft/gpl.html)
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/dosendpr.cgi,v 1.22 2005/07/14 11:26:17 ceri Exp $
|
||||
# $FreeBSD: www/en/cgi/dosendpr.cgi,v 1.23 2005/11/06 22:07:23 ceri Exp $
|
||||
|
||||
require "html.pl";
|
||||
|
||||
|
|
@ -101,6 +101,7 @@ unless (flock (DB_FH, LOCK_EX | LOCK_NB)) {
|
|||
}
|
||||
|
||||
$codeentered = $cgi_data{'code-confirm'};
|
||||
$codeentered =~ s/.*/\U$&/; # Turn input uppercase
|
||||
$currenttime = time();
|
||||
if (defined($codeentered) && $codeentered && $db_hash{$codeentered} &&
|
||||
(($currenttime - $expiretime) <= $db_hash{$codeentered})) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue