Do not append the session id on form method 'get' as it conflicts with other form...
authorRoland Häder <roland@mxchange.org>
Sat, 10 Nov 2012 14:00:14 +0000 (14:00 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 10 Nov 2012 14:00:14 +0000 (14:00 +0000)
inc/expression-functions.php
inc/filters.php

index e70d284bd82fe6f1fdf3fb8c622822378d24bde1..4b64265df5685ef192806c50f6effb95b0d162d0 100644 (file)
@@ -444,7 +444,7 @@ function doExpressionForm ($data) {
                if ($value == 'formmethodpost') {
                        // Use it
                        $data['__form_method'] = 'post';
-               } elseif (($value == 'formmethodget') && (!isSpider()) && (!isSessionValid())) {
+               } elseif (($value == 'formmethodpost') && (!isSpider()) && (!isSessionValid())) {
                        // Then expand 'value' with session id
                        if (strpos($data['value'], '?') !== FALSE) {
                                // '?' is set
index 4852a2c12d1e68e3caeed594f767019a07c352cf..e1c892448ff434da7490c20eb5261e7268070af9 100644 (file)
@@ -1343,7 +1343,7 @@ function FILTER_REDIRECT_WRONG_SERVER_NAME ($filterData) {
 // Filter for adding hidden session id
 function FILTER_ADD_INPUT_HIDDEN_SESSION_ID ($filterData) {
        // Is a spider detected?
-       if ((!isSpider()) && (!isSessionValid())) {
+       if ((!isSpider()) && (!isSessionValid()) && ($filterData['__form_method'] == 'get')) {
                // No, then add the hidden field
                $filterData['__replacer'] .= '<input type="hidden" name="' . session_name() . '" value="' . session_id() . '" />';
        } // END - if