From d4c65ad0235bc8c964d9376410e517c748add147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 19 Aug 2010 14:25:00 +0300 Subject: filter: url encoding of block script parameters and pass the denied url too. --- squark-filter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'squark-filter.c') diff --git a/squark-filter.c b/squark-filter.c index bc88e9a..8fab0bf 100644 --- a/squark-filter.c +++ b/squark-filter.c @@ -341,9 +341,11 @@ static void send_redirect(struct sqdb *db, blob_t tag, blob_t url, int categ, bl blob_push(&b, BLOB_STR(" 302:")); blob_push(&b, redirect_page); blob_push(&b, BLOB_STR("?REASON=")); - blob_push(&b, get_category_name(db, categ)); + blob_push_urlencode(&b, get_category_name(db, categ)); blob_push(&b, BLOB_STR("&USER=")); - blob_push(&b, username); + blob_push_urlencode(&b, username); + blob_push(&b, BLOB_STR("&DENIEDURL=")); + blob_push_urlencode(&b, url); blob_push(&b, lf); b = blob_pushed(BLOB_BUF(buffer), b); -- cgit v1.2.3