From: Fabian Keil Date: Tue, 21 Oct 2014 15:30:27 +0000 (+0000) Subject: Formally declare the scripts in doc/webserver/actions/ out of action X-Git-Tag: v_3_0_22~29 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=44aaef55d80fab64fe3ebf54dc6a4a5e88616051 Formally declare the scripts in doc/webserver/actions/ out of action They haven't worked in years and the docs no longer reference them. --- diff --git a/doc/webserver/actions/index.php b/doc/webserver/actions/index.php index c6ba857c..0d189aa0 100755 --- a/doc/webserver/actions/index.php +++ b/doc/webserver/actions/index.php @@ -1,328 +1,23 @@ - - - - -Privoxy: $title - - -
-

- Privoxy: $title -

-
-
-
- $message -
-
-

Valid HTML 4.01 Transitional

- - \n"); - exit; -} - - -/* - * Bookmarklet that leads here: - */ -$my_address = "http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $PHP_SELF; -$bookmarklet = "javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('$my_address?url='+escape(location.href)," . - "'Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no," . - "copyhistory=no').focus());"; - -/* - * Provide default if URL unset - */ -if (!isset($url)) -{ - $url = "http://www.example.com/"; -} -else -{ - $url = strtr($url, " ", "+"); -} - -/* - * Deny feedback which is not based on our latest - * distribution: - */ -$headers = getallheaders(); - -if (!isset($headers["X-Actions-File-Version"]) || $headers["X-Actions-File-Version"] != $required_actions_file_version) -{ - - error_abort("invalid", "

Thank you for using Privoxy's - feedback reporting mechanism! However, in order to make optimal use of our limited development resources, - we regret that we can at this time only accept problem reports based on: -

- -

We hope you will understand that we feel unable to maintain concurrent versions of the file.

-

Hint: To upgrade your actions file, follow the above link to download the file, then save as - default.action in your Privoxy config directory -

"); -} - -?> - - Privoxy Action List Feedback - Step 1 of 2 + Out of action! - -
-

- Privoxy Action List Feedback - Step 1 of 2 -

-
- -
-

- Thank you for reporting a missing or invalid action! -

- +
+

Out of action!

+

- The Privoxy team relies on your feedback to maintain an efficient actions file! -
Please fill the below form and click to proceed to step 2. + If you want to report a problem, please + follow these instructions.

-

- Please keep in mind that this is not the place for - support requests, -
bug reports or - feature requests. + Note that if your are reading this text, you are probably using an obsolete Privoxy version + and the problem may already be fixed in a more recent release.

- -
- -
-
- - - - - - - - - - - - - - - - - - -
URL: - -
Nature of the problem: - -
  - -
-
-
- -
-
-

Using Bookmarklets for Feedback

-

- To make it even easier for you, we provide a bookmarklet which will not only take you here from - any troubled page you might be surfing, but also pre-fill the form! -

-

- Please right-click the following link and choose "Add to Favorites" (IE) or "Add Bookmark for Link" (Netscape): - Privoxy - Submit Actions File Feedback -

- -

- You might get a warning that the bookmark "may not be safe" (IE) - just click OK. - For even faster access, you can put it on the "Links" bar (IE) or the "Personal Toolbar" (Netscape), - and submit feedback with a single click! -

-
-
- -

Valid HTML 4.01 Transitional

- diff --git a/doc/webserver/actions/step2.php b/doc/webserver/actions/step2.php index bdc08cd3..0d189aa0 100644 --- a/doc/webserver/actions/step2.php +++ b/doc/webserver/actions/step2.php @@ -1,518 +1,23 @@ - - - - - - -]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); - - foreach (array_unique($matches[1]) as $image_link) - { - $result[] = link_to_absolute($url, $image_link); - } - - return count($result) ? $result : 0; -} - -/* - * Function: get_image_urls - * - * Purpose: If the page is a frameset, rerurn the image URLs from all - * its frame SRCes, else from the page itself. - */ -function get_image_urls($page, $url) -{ - - preg_match_all('|]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); - - if (count($matches[1])) - { - foreach(array_unique($matches[1]) as $frame_link) - { - $framebuf = slurp_page(link_to_absolute($url, $frame_link)); - $result = array_merge($result, get_image_urls_sp($framebuf, link_to_absolute($url, $frame_link))); - } - } - else - { - $result = get_image_urls_sp($page, $url); - } - - return array_values(array_unique($result)); -} - - -/* - * Function: error_abort - * Purpose: Return an error page with $title and $message - */ -function error_abort($title, $message) -{ - if ($title == "invalid") /* shortcut */ - { - $title = "Invalid Feedback Submission"; - } - - echo (" Privoxy: $title - - -
-

- Privoxy: $title -

-
-
-
- $message -
-
-

Valid HTML 4.01 Transitional

- - \n"); - exit; -} - -/* - * Cannot start with step 2: - */ -if (!isset($referrer_url)) -{ - error_abort("invalid", "When submitting your feedback please start with - step 1."); -} - - -/* - * Cannot work on unknown problem: - */ -if (!isset($problem) || $problem == "INVALID") -{ - error_abort("invalid", "You need to select the nature of the problem in - step 1."); -} - - -/* - * If the protocol is missing from $referrer_url, prepend "http://" - */ -if (!preg_match('|^https?://|i', $referrer_url, $dummy)) -{ - $referrer_url = "http://" . $referrer_url; -} - - -/* - * Check if URL really exists and buffer its contents: - */ -if (($page = slurp_page($referrer_url)) == "FAILED") -{ - $url_confirm = " -
-

Confirm the URL:

-
-
-

- The URL that you entered could not be retrieved. Please make sure that -

-

- $referrer_url -

-

- is correct and publicly accssible. -

-

- Yes, I'm sure. -

-
"; -} -else -{ - $url_confirm = ""; -} - -/* - * Create description from problem code: - */ -switch($problem) -{ - case "P1": $problem_description="an advertisment was not blocked"; break; - case "P2": $problem_description="an innocent image was blocked"; break; - case "P3": $problem_description="the whole page was erraneously blocked"; break; - case "P4": $problem_description="the page needs popups but they don't work"; break; - case "P5": $problem_description="a problem occured"; break; - default: $problem_description="AN UNPROCESSABLE PROBLEM OCCURED"; -} - -?> - - Privoxy Action List Feedback - Step 2 of 2 + Out of action! - -
-

- Privoxy Action List Feedback - Step 2 of 2 -

-
- -
- You are about to report that on - . -
- -
-
-

- - -

- -
- - 0) - { - /* - * Open section in
; Open table: - */ - echo ("
Choose the images you want blocked from the following list:
-
-

- - \n"); - /* - * Print one table row for each image found: - */ - for ($i=0; $i< $count; $i++) - { - $image_url = link_to_absolute($referrer_url, $image_urls[$i]); - - /* - * Print the row(s): - */ - echo (" - - - - - - - \n"); - } - echo ("
- - - $image_url: - - -
- \"banner -
-

- -
- If the banner that you saw is not listed above, enter the URL here\n"); - } - else - { - echo ("
- URL of the advertisment image:\n"); - } -} - -?> - -
Hint: right-click the image, select "Copy image location" and paste the URL here. -
-
-

- -

-
- -") ?> - - - -
-

URL of the innocent image: -
Hint: right-click the image, select "Copy image location" and paste the URL here. -
This may not work if the image was blocked by size or if +image-blocker is set to redirect.
-

-
-
-

- -

-
- -") ?> - -
Severity:
-
-

- -

-
- -
- Remarks: (optional) -
-
-

- -

-
- -
- Your Name: (optional, public) -
-
-

- -

-
- -
 
-
- -
- -
- -
- -

Valid HTML 4.01 Transitional

- +
+

Out of action!

+
+

+ If you want to report a problem, please + follow these instructions. +

+

+ Note that if your are reading this text, you are probably using an obsolete Privoxy version + and the problem may already be fixed in a more recent release. +

diff --git a/doc/webserver/actions/step3.php b/doc/webserver/actions/step3.php index e75678ce..0d189aa0 100644 --- a/doc/webserver/actions/step3.php +++ b/doc/webserver/actions/step3.php @@ -1,354 +1,23 @@ - + - - - -Privoxy: $title - - -
-

- Privoxy: $title -

-
-
-
- $message -
-
-

Valid HTML 4.01 Transitional

- - \n"); - exit; -} - - -/* - * Cannot start with step 3: - */ -if (!isset($referrer_url)) -{ - error_abort("invalid", "When submitting your feedback please start with step 1."); -} - - -/* - * Cannot work on unknown problem: - */ -if (!isset($problem)) -{ - error_abort("invalid", "You need to select the nature of the problem in step 1."); -} - - -/* - * Don't accept unconfirmed URLs - */ -if (!isset($url_confirmed)) -{ - error_abort("invalid", "When submitting URLs that this script can't retrieve, you need to check \"Yes, I'm sure\" - step 2."); -} - - -/* - * Handle optional text fields: - */ -if (!isset($name) || ($name == "")) -{ - $name = "anonymous"; -} - -/* - * Assign unique ID: - */ -$item_id = date("U"); - - -/* - * Open the logfile or fail: - */ -$fp = fopen($logfile, "a"); - -if(!$fp) -{ - echo (" Internal Script Error - - -
-

Privoxy: Internal Script Error

-
-
-
-

- This script was unable to open its logfile. -

-

- Please mail its owner! -

-
-
- - "); - exit; -} - - -/* - * Write Head (type, severity, user, client-ip) - * and remarks field: - */ -fwrite($fp, "\n#FEEDBACK ID $item_id TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR VERIFIED $url_confirmed TIME " . date("r") ."\n"); -if (isset($remarks)) -{ - $lines = explode("\n", $remarks); - foreach ($lines as $line) - { - fwrite($fp, "#MASTER# REMARKS: $line\n"); - } -} - - -/* - * Depending on the type of problem reported, - * we need to write additional data: - */ -switch ($problem) -{ - /* - * Banner not blocked: - */ - case "P1": - fwrite($fp, "#MASTER# BLOCK-REFERRER: $referrer_url\n"); - if (isset($num_images)) - { - for($i=0; $i < $num_images; $i++) - { - if (isset($block_image[$i])) - { - fwrite($fp, "#MASTER# BLOCK-URL: $image_url[$i]\n"); - $trackertext .= "Block image: $image_url[$i]\n\n"; - } - } - } - if (isset($manual_image_url) && ($manual_image_url != "")) - { - fwrite($fp, "#MASTER# BLOCK-URL: $manual_image_url\n"); - $trackertext .= "Block image: $manual_image_url\n\n"; - } - break; - - /* - * Innocent image blocked: - */ - case "P2": - fwrite($fp, "#MASTER# UNBLOCK-REFERRER: $referrer_url\n"); - if (isset($image_url) && ($image_url != "")) - { - fwrite($fp, "#MASTER# UNBLOCK-URL: $image_url\n"); - $trackertext .= "Unblock image: $image_url\n\n"; - } - break; - - /* - * All other problems: - */ - default: - fwrite($fp, "#MASTER# PROBLEM-URL: $referrer_url\n"); - break; -} - -fclose($fp); - -/* - * Notify our SF tracker that new data is waiting to be - * processed - */ -switch($problem) -{ - case "P1": $category_id="412811"; $summary = "Ad not blocked "; break; - case "P2": $category_id="412810"; $summary = "Image blocked ";break; - case "P3": $category_id="412812"; $summary = "Page blocked ";break; - case "P4": $category_id="412813"; $summary = "Popups blocked ";break; - case "P5": $category_id="412814"; $summary = "Other problem ";break; - default: $category_id="412814"; $summary = "IMPOSSIBLE ";break; -} - -$summary .= "on " . $referrer_url . " (" .$item_id . ")"; -$priority = 3 * $severity; - -$details = urlencode("On " . date("r") . " new data was received from $name:\n\n" - ."URL: $referrer_url\n\n$trackertext\nRemarks:\n$remarks"); - -$postfields = ( "group_id=11118&atid=460288&func=postadd&category_id=$category_id&artifact_group_id=195890" . - "&priority=$priority&summary=$summary&details=$details" ); - -$ch = curl_init ("http://sourceforge.net/tracker/index.php"); -curl_setopt($ch, CURLOPT_HEADER, 0); -curl_setopt($ch, CURLOPT_FAILONERROR, 1); -curl_setopt($ch, CURLOPT_TIMEOUT, 20); -curl_setopt($ch, CURLOPT_POST, 1); -curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); - -ob_start(); -curl_exec($ch); -ob_end_clean(); - -curl_close ($ch); - -?> - - Privoxy Action List Feedback - Result + Out of action! - -
-

- Privoxy Action List Feedback - Result -

-
- -
+
+

Out of action!

+

- Thank you very much for taking the time to submit your feedback! + If you want to report a problem, please + follow these instructions.

-

- The developers will review and use your submission to improve the - distribution actions file. + Note that if your are reading this text, you are probably using an obsolete Privoxy version + and the problem may already be fixed in a more recent release.

- -

- -

- -
- -

Valid HTML 4.01 Transitional

-