changeset 152:bc69717ff386

Increase max username length to 20. Length is now enforced by sqlickrypt.
author John "Elwin" Edwards
date Sun, 30 Mar 2014 20:42:48 -0700
parents 9f9bc41d5006
children b5a1430d0f71
files index-rlg.html sqlickrypt.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/index-rlg.html	Sun Mar 09 16:15:42 2014 -0700
+++ b/index-rlg.html	Sun Mar 30 20:42:48 2014 -0700
@@ -118,7 +118,7 @@
 </div>
 <div class="modal" id="register">
 <div class="formtable">
-<div><div>Name:</div><div><input type="text" name="name" id="regin_name" maxlength="10"></div></div>
+<div><div>Name:</div><div><input type="text" name="name" id="regin_name" maxlength="20"></div></div>
 <div><div>Password:</div><div><input type="password" name="pw" id="regin_pw"></div></div>
 <div><div>E-mail (optional):</div><div><input type="text" name="email" id="regin_email"></div></div>
 <div>
--- a/sqlickrypt.c	Sun Mar 09 16:15:42 2014 -0700
+++ b/sqlickrypt.c	Sun Mar 30 20:42:48 2014 -0700
@@ -118,6 +118,10 @@
   sqlite3_stmt *qstmt;
   char salt[20];
 
+  if (strlen(uname) > 20) {
+    return 4;
+  }
+
   opendb(&db, &qstmt, checkquery);
   /* Check for existing account in the same transaction with creating it. */
   status = sqlite3_exec(db, "BEGIN;", NULL, NULL, NULL);