X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=02259d8a5c1b9d98371cc80fda394ab323c7912c;hp=6f16d847e0f1cab37a56e8ac761f5d9f046e8de6;hb=0a8865e0da215820eeb4f691f0d5f0de4b8896dc;hpb=97110184221edacdb7d4dfc29de0e38d63f4d831 diff --git a/filters.c b/filters.c index 6f16d847..02259d8a 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.52 2002/03/24 16:35:57 jongfoster Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.55 2002/04/02 16:13:51 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -38,6 +38,15 @@ const char filters_rcs[] = "$Id: filters.c,v 1.52 2002/03/24 16:35:57 jongfoster * * Revisions : * $Log: filters.c,v $ + * Revision 1.55 2002/04/02 16:13:51 oes + * Fix: No "Go there anyway" for SSL + * + * Revision 1.54 2002/04/02 14:55:56 oes + * Bugfix: is_untrusted_url() now depends on FEATURE_TRUST, not FEATURE_COOKIE_JAR + * + * Revision 1.53 2002/03/26 22:29:54 swa + * we have a new homepage! + * * Revision 1.52 2002/03/24 16:35:57 jongfoster * Removing logo * @@ -815,10 +824,13 @@ struct http_response *block_url(struct client_state *csp) #ifdef FEATURE_FORCE_LOAD err = map(exports, "force-prefix", 1, FORCE_PREFIX, 1); -#else /* ifndef FEATURE_FORCE_LOAD */ - err = map_block_killer(exports, "force-support"); + if (csp->http->ssl != 0) #endif /* ndef FEATURE_FORCE_LOAD */ + { + err = map_block_killer(exports, "force-support"); + } + if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0); if (!err) err = map(exports, "path", 1, html_encode(csp->http->path), 0); @@ -890,9 +902,10 @@ struct http_response *trust_url(struct client_state *csp) } /* - * Export the host, port, and referrer information + * Export the protocol, host, port, and referrer information */ err = map(exports, "hostport", 1, csp->http->hostport, 1); + if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); if (!err) err = map(exports, "path", 1, csp->http->path, 1); if (NULL != (p = get_header_value(csp->headers, "Referer:"))) @@ -939,7 +952,7 @@ struct http_response *trust_url(struct client_state *csp) p = strdup(""); for (l = csp->config->trust_info->first; l ; l = l->next) { - sprintf(buf, "
  • %s
    \n",l->str, l->str); + sprintf(buf, "
  • %s
    \n",l->str, l->str); string_append(&p, buf); } err = map(exports, "trust-info", 1, p, 0); @@ -1093,7 +1106,7 @@ int is_imageurl(struct client_state *csp) #endif /* def FEATURE_IMAGE_BLOCKING */ -#ifdef FEATURE_COOKIE_JAR +#ifdef FEATURE_TRUST /********************************************************************* * * Function : is_untrusted_url @@ -1147,15 +1160,10 @@ int is_untrusted_url(struct client_state *csp) return 1; } - /* - * If not, do we maybe trust its referrer? - */ - /* - * Parse the URL from the referrer + * If not, do we maybe trust its referrer? */ - err = parse_http_url(referer, rhttp, csp); if (err) { @@ -1217,7 +1225,7 @@ int is_untrusted_url(struct client_state *csp) } return 1; } -#endif /* def FEATURE_COOKIE_JAR */ +#endif /* def FEATURE_TRUST */ /*********************************************************************