Plugin Directory

Changeset 2692612


Ignore:
Timestamp:
03/11/2022 01:57:30 PM (4 years ago)
Author:
melkarim
Message:

header forwarding bugfix

Location:
addefend-easy-integration
Files:
1 added
4 edited
12 copied

Legend:

Unmodified
Added
Removed
  • addefend-easy-integration/tags/1.12/Components/proxy_internal_forwarding.php

    r2688771 r2692612  
    1818            $headers = getHeaders();
    1919            $headers["X-Forwarded-For"] = $_SERVER['REMOTE_ADDR'];
     20            $headers['Connection']= 'close';
    2021            $streamHeaders = '';
    2122            foreach ($headers as $key => $value) {
    22                 if ($key === "Cookie") {
    23                     $patterns = array("/ xdef[^;]*;/", "/ ade[^;]*;/");
    24                     foreach ($patterns as $patternValue) {
    25                         $output = array();
    26                         preg_match_all($patternValue, " " . $value, $output, PREG_PATTERN_ORDER);
    27                         $cookie = implode('', $output[0]);
    28                     }
    29                     if (isset($cookie) && strlen($cookie) !== 0) {
    30                         $streamHeaders .= "$key: $cookie" . "\r\n";
    31                     }
    32                 } else {
    33                     $streamHeaders .= "$key: $value" . "\r\n";
    34                 }
     23                $streamHeaders .= "$key: $value" . "\r\n";
    3524            }
    36             $streamHeaders .= 'Connection: close' . "\r\n";
    3725
    3826            $opts = array(
  • addefend-easy-integration/tags/1.12/Utils/misc.php

    r2688771 r2692612  
    121121    foreach ($_SERVER as $key => $value) {
    122122        if (substr($key, 0, 5) == "HTTP_") {
    123             $key = str_replace(" ", "-", ucwords(strtolower(str_replace("_", "", substr($key, 5)))));
     123            $key = substr($key, 5);
     124            $key = str_replace("_", " ", $key);
     125            $key = strtolower($key);
     126            $key = ucwords($key);
     127            $key = str_replace(" ", "-", $key);
    124128            $out[$key] = $value;
    125129        }
  • addefend-easy-integration/tags/1.12/addefend-easy-integration.php

    r2688771 r2692612  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.11
     6Version: 1.12
    77Author: AdDefend GmbH
    88Author URI: https://www.addefend.com/
  • addefend-easy-integration/tags/1.12/readme.txt

    r2688771 r2692612  
    44Requires at least: 4.2
    55Tested up to: 5.9
    6 Stable tag: 1.11
     6Stable tag: 1.12
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    1717
    1818By means of the *AdDefend Easy Integration Plugin*, publishers who have wordpress-based websites can now install AdDefend in a matter of seconds. You only have to configure it once using the parameters provided by AdDefend and it will do the rest.
    19 
    20 == Prerequisites ==
    21 * Wordpress is running on an Apache server
    22 * The *rewrite module* is activated
    23 * WordPress has write permissions to your **.htaccess** file
    2419
    2520== Installation ==
     
    3934If it wasn't provided by AdDefend, then you will have to put in the path to where your images are stored in your server's file system.
    4035
    41 = How to activate the Rewrite module? =
    42 
    43 Please execute : <code>sudo a2enmod rewrite</code>
    44 
    45 = I don't have a .htaccess file, what now? =
    46 
    47 You must have a **.htaccess** file, please create it in your website directory and make sure that Wordpress can write to it.
    48 
    4936== Screenshots ==
    50371. Empty settings
    5138
    5239== Changelog ==
     40
     41= 1.12 =
     42* header forwarding bugfix
    5343
    5444= 1.11 =
  • addefend-easy-integration/trunk/Components/proxy_internal_forwarding.php

    r2688771 r2692612  
    1818            $headers = getHeaders();
    1919            $headers["X-Forwarded-For"] = $_SERVER['REMOTE_ADDR'];
     20            $headers['Connection']= 'close';
    2021            $streamHeaders = '';
    2122            foreach ($headers as $key => $value) {
    22                 if ($key === "Cookie") {
    23                     $patterns = array("/ xdef[^;]*;/", "/ ade[^;]*;/");
    24                     foreach ($patterns as $patternValue) {
    25                         $output = array();
    26                         preg_match_all($patternValue, " " . $value, $output, PREG_PATTERN_ORDER);
    27                         $cookie = implode('', $output[0]);
    28                     }
    29                     if (isset($cookie) && strlen($cookie) !== 0) {
    30                         $streamHeaders .= "$key: $cookie" . "\r\n";
    31                     }
    32                 } else {
    33                     $streamHeaders .= "$key: $value" . "\r\n";
    34                 }
     23                $streamHeaders .= "$key: $value" . "\r\n";
    3524            }
    36             $streamHeaders .= 'Connection: close' . "\r\n";
    3725
    3826            $opts = array(
  • addefend-easy-integration/trunk/Utils/misc.php

    r2688771 r2692612  
    121121    foreach ($_SERVER as $key => $value) {
    122122        if (substr($key, 0, 5) == "HTTP_") {
    123             $key = str_replace(" ", "-", ucwords(strtolower(str_replace("_", "", substr($key, 5)))));
     123            $key = substr($key, 5);
     124            $key = str_replace("_", " ", $key);
     125            $key = strtolower($key);
     126            $key = ucwords($key);
     127            $key = str_replace(" ", "-", $key);
    124128            $out[$key] = $value;
    125129        }
  • addefend-easy-integration/trunk/addefend-easy-integration.php

    r2688771 r2692612  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.11
     6Version: 1.12
    77Author: AdDefend GmbH
    88Author URI: https://www.addefend.com/
  • addefend-easy-integration/trunk/readme.txt

    r2688771 r2692612  
    44Requires at least: 4.2
    55Tested up to: 5.9
    6 Stable tag: 1.11
     6Stable tag: 1.12
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    1717
    1818By means of the *AdDefend Easy Integration Plugin*, publishers who have wordpress-based websites can now install AdDefend in a matter of seconds. You only have to configure it once using the parameters provided by AdDefend and it will do the rest.
    19 
    20 == Prerequisites ==
    21 * Wordpress is running on an Apache server
    22 * The *rewrite module* is activated
    23 * WordPress has write permissions to your **.htaccess** file
    2419
    2520== Installation ==
     
    3934If it wasn't provided by AdDefend, then you will have to put in the path to where your images are stored in your server's file system.
    4035
    41 = How to activate the Rewrite module? =
    42 
    43 Please execute : <code>sudo a2enmod rewrite</code>
    44 
    45 = I don't have a .htaccess file, what now? =
    46 
    47 You must have a **.htaccess** file, please create it in your website directory and make sure that Wordpress can write to it.
    48 
    4936== Screenshots ==
    50371. Empty settings
    5138
    5239== Changelog ==
     40
     41= 1.12 =
     42* header forwarding bugfix
    5343
    5444= 1.11 =
Note: See TracChangeset for help on using the changeset viewer.