Changeset 1251


Ignore:
Timestamp:
05/10/10 01:07:47 (7 years ago)
Author:
gogo
Message:

ticket:1518

Changeset requires that if a non default key location is used in xinha_pass_to_php_backend, that the same key location must also be passed as a parameter to xinha_read_passed_data.
Potentially this whole non-default thing could be stripped out as it's perhaps not that useful anyway, but seems reasonable to minimise the change in this manner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contrib/php-xinha.php

    r1244 r1251  
    144144  */ 
    145145   
    146   function xinha_read_passed_data() 
     146  function xinha_read_passed_data($KeyLocation = 'Xinha:BackendKey') 
    147147  { 
    148148   if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data'])) 
     
    153153     if(!isset($_SESSION[$bk['key_location']])) return NULL; 
    154154      
     155     if($KeyLocation !== $bk['key_location']) 
     156     { 
     157      trigger_error('Programming Error - please contact the website administrator/programmer to alert them to this problem. A non-default backend key location is being used to pass backend data to Xinha, but the same key location is not being used to receive data.  The special backend configuration has been ignored.  To resolve this, find where you are using xinha_pass_to_php_backend and remove the non default key, or find the locations where xinha_read_passed_data is used (in Xinha) and add a parameter with the non default key location, or edit contrib/php-xinha.php and change the default key location in both these functions.  See: http://trac.xinha.org/ticket/1518', E_USER_ERROR);      
     158      return NULL; 
     159     } 
     160           
    155161     if($bk['hash']         ===  
    156162        function_exists('sha1') ?  
Note: See TracChangeset for help on using the changeset viewer.