diff options
Diffstat (limited to 'squark-filter.c')
-rw-r--r-- | squark-filter.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/squark-filter.c b/squark-filter.c index 78728de..ce2d183 100644 --- a/squark-filter.c +++ b/squark-filter.c @@ -138,6 +138,8 @@ static int url_parse(blob_t uri, struct url_info *nfo) nfo->num_dots = cur.num_dots; nfo->is_ipv4 = cur.numeric && cur.num_dots == 3; } + if (blob_is_null(nfo->host)) + nfo->host = BLOB_STR("localhost"); break; } } while (blob_is_null(nfo->host) && !blob_is_null(uri)); @@ -407,13 +409,6 @@ static void read_input(struct sqdb *db) if (authdb_check_login(token, &entry, username, now)) { auth_ok = 1; username = BLOB_STRLEN(entry.p.login_name); - } else if (blob_cmp(username, dash) != 0 || - blob_is_null(redirect_login_page)) { - auth_ok = 1; - authdb_clear_entry(&entry); - entry.p.block_categories = banned_categories; - memcpy(entry.p.login_name, username.ptr, username.len); - authdb_commit_login(token, &entry, now); } else { auth_ok = 0; } |