From df7ffbb0628ec129af4f11353d7a51afd1f4052c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 7 Sep 2010 15:21:25 +0300 Subject: filter: do not do auto-login, fix url parsing without hostname do not have filter process to do auto login. this is required since squid might have stale login info in cache, and we should not honor it. need to fix auth-snmp to record logins in authdb too (should do that anyway to store the additional snmp information in authdb). --- squark-filter.c | 9 ++------- 1 file 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; } -- cgit v1.2.3