[llvm-commits] CVS: llvm-www/releases/testregister.cgi
John Criswell
criswell at cs.uiuc.edu
Thu Dec 18 13:09:01 PST 2003
Changes in directory llvm-www/releases:
testregister.cgi updated: 1.10 -> 1.11
---
Log message:
Check fields for colons.
---
Diffs of the changes: (+37 -4)
Index: llvm-www/releases/testregister.cgi
diff -u llvm-www/releases/testregister.cgi:1.10 llvm-www/releases/testregister.cgi:1.11
--- llvm-www/releases/testregister.cgi:1.10 Thu Dec 18 12:00:52 2003
+++ llvm-www/releases/testregister.cgi Thu Dec 18 13:08:28 2003
@@ -15,6 +15,20 @@
logfilename='/var/tmp/LLVMDownloads'
#
+# Function: checkForColon()
+#
+# Description:
+# This function checks a string to see if it contains a colon.
+#
+def checkForColon (item):
+ length = len (item) - 1
+ while (length != 0):
+ if (item[length] == ':'):
+ return true
+ length=length - 1
+ return false
+
+#
# Function: Subscribe()
#
# Description:
@@ -68,10 +82,11 @@
#
# Verify if the required fields have been supplied.
#
- firstname = form.getfirst ('firstname', '')
- lastname = form.getfirst ('lastname', '')
- email = form.getfirst ('email', '')
- announce = form.getfirst ('announce','yes')
+ firstname = form.getfirst ('firstname', '')
+ lastname = form.getfirst ('lastname', '')
+ email = form.getfirst ('email', '')
+ title = form.getfirst ('title','')
+ organization = form.getfirst ('organization', '')
#
# Verify that the name and email fields have been filled in.
@@ -103,6 +118,24 @@
length=length - 1
else:
return 'Email address has no periods'
+
+ #
+ # Verify that there are no colons in fields placed in the logfile.
+ #
+ if (checkForColon (email)):
+ return 'Email address has a colon'
+
+ if (checkForColon (firstname)):
+ return 'First name has a colon'
+
+ if (checkForColon (lastname)):
+ return 'Last name has a colon'
+
+ if (checkForColon (organization)):
+ return 'Organization has a colon'
+
+ if (checkForColon (title)):
+ return 'Title has a colon'
return ''
More information about the llvm-commits
mailing list