diff options
-rw-r--r-- | src/squark-filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/squark-filter.c b/src/squark-filter.c index 22c8800..ac99a67 100644 --- a/src/squark-filter.c +++ b/src/squark-filter.c @@ -405,6 +405,11 @@ static void read_input(struct sqdb *db) if (authdb_check_login(token, &entry, username, now, &adbc)) { auth_ok = 1; username = BLOB_STRLEN(entry.p.login_name); + } else if (!blob_is_null(username) && blob_cmp(username, dash) != 0) { + auth_ok = 1; + authdb_clear_entry(&entry); + memcpy(entry.p.login_name, username.ptr, username.len); + authdb_commit_login(token, &entry, now, &adbc); } else { auth_ok = 0; } |