Update of /cvsroot/ijbswa/current In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14548 Modified Files: ChangeLog actionlist.h actions.c default.action.master parsers.c project.h regression-tests.action Log Message: Remove send-wafer and send-vanilla-wafer actions. Index: ChangeLog =================================================================== RCS file: /cvsroot/ijbswa/current/ChangeLog,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- ChangeLog 28 Mar 2008 15:13:36 -0000 1.80 +++ ChangeLog 29 Mar 2008 12:13:44 -0000 1.81 @@ -41,6 +41,9 @@ PCRS-based popup filters can do the same and are less unreliable. - The inspect-jpegs action has been removed. +- The send-wafer and send-vanilla-wafer actions have been removed. + They weren't particular useful and their behaviour could be emulated + with add-header anyway. *** Version 3.0.8 *** Index: actionlist.h =================================================================== RCS file: /cvsroot/ijbswa/current/actionlist.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- actionlist.h 28 Mar 2008 15:13:42 -0000 1.32 +++ actionlist.h 29 Mar 2008 12:13:45 -0000 1.33 @@ -39,6 +39,9 @@ * * Revisions : * $Log$ + * Revision 1.33 2008/03/29 12:13:45 fabiankeil + * Remove send-wafer and send-vanilla-wafer actions. + * * Revision 1.32 2008/03/28 15:13:42 fabiankeil * Remove inspect-jpegs action. * @@ -240,8 +243,6 @@ DEFINE_ACTION_BOOL ("prevent-compression", ACTION_NO_COMPRESSION) DEFINE_ACTION_STRING ("redirect", ACTION_REDIRECT, ACTION_STRING_REDIRECT) DEFINE_CGI_PARAM_NO_RADIO("redirect", ACTION_REDIRECT, ACTION_STRING_REDIRECT, "http://localhost/") -DEFINE_ACTION_BOOL ("send-vanilla-wafer", ACTION_VANILLA_WAFER) -DEFINE_ACTION_MULTI ("send-wafer", ACTION_MULTI_WAFER) DEFINE_ACTION_MULTI ("server-header-filter", ACTION_MULTI_SERVER_HEADER_FILTER) DEFINE_ACTION_MULTI ("server-header-tagger", ACTION_MULTI_SERVER_HEADER_TAGGER) DEFINE_ACTION_BOOL ("session-cookies-only", ACTION_NO_COOKIE_KEEP) @@ -280,8 +281,6 @@ DEFINE_ACTION_BOOL ("no-cookies-keep", ACTION_NO_COOKIE_KEEP) DEFINE_ACTION_BOOL ("no-cookies-read", ACTION_NO_COOKIE_READ) DEFINE_ACTION_BOOL ("no-cookies-set", ACTION_NO_COOKIE_SET) -DEFINE_ACTION_BOOL ("vanilla-wafer", ACTION_VANILLA_WAFER) -DEFINE_ACTION_MULTI ("wafer", ACTION_MULTI_WAFER) #endif /* if DEFINE_ACTION_ALIAS */ #undef DEFINE_ACTION_MULTI Index: actions.c =================================================================== RCS file: /cvsroot/ijbswa/current/actions.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- actions.c 28 Mar 2008 18:17:14 -0000 1.48 +++ actions.c 29 Mar 2008 12:13:45 -0000 1.49 @@ -33,6 +33,9 @@ * * Revisions : * $Log$ + * Revision 1.49 2008/03/29 12:13:45 fabiankeil + * Remove send-wafer and send-vanilla-wafer actions. + * * Revision 1.48 2008/03/28 18:17:14 fabiankeil * In action_used_to_be_valid(), loop through an array of formerly * valid actions instead of using an OR-chain of strcmpic() calls. @@ -661,7 +664,11 @@ static const char *formerly_valid_actions[] = { "inspect-jpegs", "kill-popups", - "treat-forbidden-connects-like-blocks" + "send-vanilla-wafer", + "send-wafer", + "treat-forbidden-connects-like-blocks", + "vanilla-wafer", + "wafer" }; int i; Index: default.action.master =================================================================== RCS file: /cvsroot/ijbswa/current/default.action.master,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- default.action.master 28 Mar 2008 15:13:39 -0000 1.121 +++ default.action.master 29 Mar 2008 12:13:45 -0000 1.122 @@ -176,7 +176,7 @@ # +name{param} # enable and set parameter to "param" # -name # disable # -# Multi-value (e.g. "add-header", "send-wafer"): +# Multi-value (e.g. "add-header", "filter"): # +name{param} # enable and add parameter "param" # -name{param} # remove the parameter "param" # -name # disable totally @@ -472,17 +472,6 @@ # another location and the browser should get it from the specified # URL. # -# +send-vanilla-wafer -# This action only applies if you are using a jarfile. It sends a -# cookie to every site stating that you do not accept any copyright -# on cookies sent to you, and asking them not to track you. Of -# course, this is a (relatively) unique header they could use to -# track you. -# -# +send-wafer{name=value} -# This allows you to add an arbitrary cookie. Specify it multiple -# times in order to add several cookies. -# ############################################################################# ############################################################################# Index: parsers.c =================================================================== RCS file: /cvsroot/ijbswa/current/parsers.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- parsers.c 28 Mar 2008 15:13:39 -0000 1.122 +++ parsers.c 29 Mar 2008 12:13:46 -0000 1.123 @@ -44,6 +44,9 @@ * * Revisions : * $Log$ + * Revision 1.123 2008/03/29 12:13:46 fabiankeil + * Remove send-wafer and send-vanilla-wafer actions. + * * Revision 1.122 2008/03/28 15:13:39 fabiankeil * Remove inspect-jpegs action. * @@ -856,7 +859,6 @@ static jb_err server_content_disposition(struct client_state *csp, char **header); static jb_err client_host_adder (struct client_state *csp); -static jb_err client_cookie_adder (struct client_state *csp); static jb_err client_xtra_adder (struct client_state *csp); static jb_err connection_close_adder (struct client_state *csp); @@ -918,7 +920,6 @@ const add_header_func_ptr add_client_headers[] = { client_host_adder, - client_cookie_adder, client_xtra_adder, /* Temporarily disabled: client_accept_encoding_adder, */ connection_close_adder, @@ -930,16 +931,6 @@ NULL }; -/* The vanilla wafer. */ -static const char VANILLA_WAFER[] = - "NOTICE=TO_WHOM_IT_MAY_CONCERN_" - "Do_not_send_me_any_copyrighted_information_other_than_the_" - "document_that_I_am_requesting_or_any_of_its_necessary_components._" - "In_particular_do_not_send_me_any_cookies_that_" - "are_subject_to_a_claim_of_copyright_by_anybody._" - "Take_notice_that_I_refuse_to_be_bound_by_any_license_condition_" - "(copyright_or_otherwise)_applying_to_any_cookie._"; - /********************************************************************* * * Function : flush_socket @@ -3541,69 +3532,6 @@ } -/********************************************************************* - * - * Function : client_cookie_adder - * - * Description : Used in the add_client_headers list to add "wafers". - * Called from `sed'. - * - * Parameters : - * 1 : csp = Current client state (buffers, headers, etc...) - * - * Returns : JB_ERR_OK on success, or - * JB_ERR_MEMORY on out-of-memory error. - * - *********************************************************************/ -jb_err client_cookie_adder(struct client_state *csp) -{ - char *tmp; - struct list_entry *wafer; - struct list_entry *wafer_list; - jb_err err; - - /* - * If the user has not supplied any wafers, and the user has not - * told us to suppress the vanilla wafer, then send the vanilla wafer. - */ - if ((0 != (csp->action->flags & ACTION_VANILLA_WAFER)) - && list_is_empty(csp->action->multi[ACTION_MULTI_WAFER])) - { - enlist(csp->action->multi[ACTION_MULTI_WAFER], VANILLA_WAFER); - } - - wafer_list = csp->action->multi[ACTION_MULTI_WAFER]->first; - - if (NULL == wafer_list) - { - /* Nothing to do */ - return JB_ERR_OK; - } - - tmp = strdup("Cookie: "); - - for (wafer = wafer_list; (NULL != tmp) && (NULL != wafer); wafer = wafer->next) - { - if (wafer != wafer_list) - { - /* As this isn't the first wafer, we need a delimiter. */ - string_append(&tmp, "; "); - } - string_join(&tmp, cookie_encode(wafer->str)); - } - - if (tmp == NULL) - { - return JB_ERR_MEMORY; - } - - log_error(LOG_LEVEL_HEADER, "addh: %s", tmp); - err = enlist(csp->headers, tmp); - free(tmp); - return err; -} - - #if 0 /********************************************************************* * Index: project.h =================================================================== RCS file: /cvsroot/ijbswa/current/project.h,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- project.h 28 Mar 2008 15:13:41 -0000 1.109 +++ project.h 29 Mar 2008 12:13:46 -0000 1.110 @@ -37,6 +37,9 @@ * * Revisions : * $Log$ + * Revision 1.110 2008/03/29 12:13:46 fabiankeil + * Remove send-wafer and send-vanilla-wafer actions. + * * Revision 1.109 2008/03/28 15:13:41 fabiankeil * Remove inspect-jpegs action. * @@ -1051,8 +1054,8 @@ #define ACTION_NO_COOKIE_SET 0x00002000UL /** Action bitmap: Override the forward settings in the config file */ #define ACTION_FORWARD_OVERRIDE 0x00004000UL -/** Action bitmap: Send a vanilla wafer. */ -#define ACTION_VANILLA_WAFER 0x00008000UL +/** Action bitmap: Block as empty document */ +#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x00008000UL /** Action bitmap: Limit CONNECT requests to safe ports. */ #define ACTION_LIMIT_CONNECT 0x00010000UL /** Action bitmap: Redirect request. */ @@ -1075,8 +1078,6 @@ #define ACTION_OVERWRITE_LAST_MODIFIED 0x02000000UL /** Action bitmap: Replace or block Accept-Language header */ #define ACTION_HIDE_ACCEPT_LANGUAGE 0x04000000UL -/** Action bitmap: Block as empty document */ -#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x08000000UL /** Action string index: How to deanimate GIFs */ @@ -1123,20 +1124,18 @@ /** Index into current_action_spec::multi[] for headers to add. */ #define ACTION_MULTI_ADD_HEADER 0 -/** Index into current_action_spec::multi[] for headers to add. */ -#define ACTION_MULTI_WAFER 1 /** Index into current_action_spec::multi[] for content filters to apply. */ -#define ACTION_MULTI_FILTER 2 +#define ACTION_MULTI_FILTER 1 /** Index into current_action_spec::multi[] for server-header filters to apply. */ -#define ACTION_MULTI_SERVER_HEADER_FILTER 3 +#define ACTION_MULTI_SERVER_HEADER_FILTER 2 /** Index into current_action_spec::multi[] for client-header filters to apply. */ -#define ACTION_MULTI_CLIENT_HEADER_FILTER 4 +#define ACTION_MULTI_CLIENT_HEADER_FILTER 3 /** Index into current_action_spec::multi[] for client-header tags to apply. */ -#define ACTION_MULTI_CLIENT_HEADER_TAGGER 5 +#define ACTION_MULTI_CLIENT_HEADER_TAGGER 4 /** Index into current_action_spec::multi[] for server-header tags to apply. */ -#define ACTION_MULTI_SERVER_HEADER_TAGGER 6 +#define ACTION_MULTI_SERVER_HEADER_TAGGER 5 /** Number of multi-string actions. */ -#define ACTION_MULTI_COUNT 7 +#define ACTION_MULTI_COUNT 6 /** Index: regression-tests.action =================================================================== RCS file: /cvsroot/ijbswa/current/regression-tests.action,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- regression-tests.action 28 Mar 2008 15:13:41 -0000 1.6 +++ regression-tests.action 29 Mar 2008 12:13:46 -0000 1.7 @@ -366,30 +366,6 @@ TAG:^prevent-compression$ ####################################################### -# Test send-wafer. -####################################################### - -# Set Header = X-Does-Not-Matter: Foo bar -# Expect Header = Cookie: Tracking+me+is+easy+due+to+my+stupid+wafer+cookie -{\ - +send-wafer{Tracking me is easy due to my stupid wafer cookie}\ - -send-vanilla-wafer \ -} -TAG:^send-wafer\{Tracking me is easy due to my stupid wafer cookie\}$ - -####################################################### -# Test send-vanilla-wafer. -####################################################### - -# Set Header = X-Does-Not-Matter: Foo bar -# Expect Header = Cookie: NOTICE=TO_WHOM_IT_MAY_CONCERN_Do_not_send_me_any_copyrighted_information_other_than_the_document_that_I_am_requesting_or_any_of_its_necessary_components._In_particular_do_not_send_me_any_cookies_that_are_subject_to_a_claim_of_copyright_by_anybody._Take_notice_that_I_refuse_to_be_bound_by_any_license_condition_(copyright_or_otherwise)_applying_to_any_cookie._ -{\ - +send-vanilla-wafer \ - -send-wafer \ -} -TAG:^send-vanilla-wafer$ - -####################################################### # Test content filters which could cause problems with # range requests. ####################################################### |