Re: BUGFIX: Something to do with $_xh[$parser]['ac']

Edd Dumbill <[email protected]>
Newsgroups gmane.comp.php.xml-rpc
Message-ID <[email protected]>
I understand this is fixed in CVS.  I've copied your mail to the
phpxmlrpc mailing list where I request you post further questions.

Thanks

Edd.

On Sat, 2003-01-18 at 19:39, Charlie Dyson wrote:
> I don't understand this bug (because I don't know the code), however
> there is a problem in xmlrpc.inc, v 1.1.1.1.2.3 2001/11/29 in which the
> following line does not work:
> $_xh[$parser]['ac'].=str_replace('$', '\$',
> -		str_replace('"', '\"', str_replace(chr(92),
> -			$xmlrpc_backslash, $data)));
> 
> This is because your code assumes that $_xh[$parser]['ac'] is set, which
> is not always the case. Your version of PHP may allow you to get away
> with it, but mine doesn't! Here's the patch:
> --- xmlrpc.inc	2002-12-27 17:48:08.000000000 +0000
> +++ xmlrpc.inc.NEW	2002-12-27 17:49:21.000000000 +0000
> @@ -330,9 +330,14 @@
>  		}
>  	// replace characters that eval would
>  	// do special things with
> -	$_xh[$parser]['ac'].=str_replace('$', '\$',
> -		str_replace('"', '\"', str_replace(chr(92),
> -			$xmlrpc_backslash, $data)));
> +		// EXPERIMENTAL FIX:
> +		if(array_key_exists('ac', $_xh[$parser])) {
> +			$_xh[$parser]['ac'].=str_replace('$', '\$',
> +				str_replace('"', '\"', str_replace(chr(92),
> +					$xmlrpc_backslash, $data)));
> +		} else {
> +			$_xh[$parser]['ac'] = '';
> +		}
>  	}
>  }
>  
> Sorry if you've fixed it already. I think this patch should apply
> correctly, but haven't had time to check.
> 
> By the way, is there anything you can tell me about authentication and
> sessions with PHP/xmlrpc? I'd like to use cookies or something like I do
> with normal web access to my project, but if I can't do that, should I
> just create a session with a random string which the client will send to
> every function call? Advice much appreciated.
> 
> Thanks,
> 
> Charlie Dyson <[email protected]>
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com

_______________________________________________
phpxmlrpc mailing list
[email protected]
http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+K+8mrxbtsbubhxERAluSAJ99m6IxrloRqjTKSKX12kEQYBV8bwCfQ5cN
2Bfsml9BJ+rgwZ5gdBy9sKg=
=3qq3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.