Increase max username length to 20.

Length is now enforced by sqlickrypt.
This commit is contained in:
John "Elwin" Edwards 2014-03-30 20:42:48 -07:00
parent 0c75cdca4a
commit c818646ef6
2 changed files with 5 additions and 1 deletions

View file

@ -118,6 +118,10 @@ int insertuser(char *uname, char *pw, char *email) {
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);