Re: Change User on a pconnect

From: Date: Sat, 06 Nov 1999 17:38:09 +0000
Subject: Re: Change User on a pconnect
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-12179@lists.php.net to get a copy of this message
On Sat, 6 Nov 1999, Rasmus Lerdorf wrote: > > > By the way, what prevents someone from guessing a persistent link > > > identifier and using it without authenticating on it right now? I don't > > > see the code that prevents this, but I should take a closer look. I'll > > > play with this stuff this afternoon. I'll probably wait until after > > > 3.0.13/4.0RC2 before I commit it though to avoid last-second breakage. > > > > hmm, in PHP 4 the link would be a resource and only c-modules can create > > resources. in PHP 3 this could be a problem, and thinking a bit longer > > .... i believe every script could guess a link-number - that's not good. > > Yeah, I was only looking at PHP 3 code where the thing is just an > integer. I'd like to verify/fix this before 3.0.13 and will get right on > it after lunch here. rasmus, that sounds non-trivial to me! in php4 we just need to make sure that only c-modules can create resources. the only thing that comes to mind is to offset link-id's by an offset that's randomly generated in the RINIT() function of the module (or global). that way link-id's would be "harder" to guess... the whole thing is only an issue for ISP with evil customers, isn't it? (one customer tries to steal data from another customers table in the same database-instance) i think we need to rethink the whole plist/pconnect stuff anyhow - the do_logon() functions are really, really hard to understand - and a lot of their complexity is repeated in every module that supports pconnects. (and now we have the same "bug" in all db-modules;-( a rewrite in that area would also be needed if we want to share connections between threads in ZTS mode. so: let's try to "close the hole" for PHP 3 and come up with something better form PHP 4 *after* B3. tc > > -Rasmus > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.dev (#12179) next »