Re: Change User on a pconnect

From: Date: Sat, 06 Nov 1999 17:04:04 +0000
Subject: Re: Change User on a pconnect
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-12172@lists.php.net to get a copy of this message
At 11:49 AM 11/6/99 -0500, Rasmus Lerdorf wrote:
That would work. Then the next question is whether we need to keep the username/password stored in the hash up to date. ie. if the user calls the user-level mysql_change_user() function, we should probably modify the info in the hashed structure to reflect the currently authenticated user on that link.
yes, you'd definitely need to do that. mysql_change_user() would search for the link by hostname and then update the hashed structure in case the change_user is successful.
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.
I don't think you can really cast to a resource (at least you shouldn't be able to) so I'm not quite sure this would work. Try and take a look at the code, I'm not sure as I haven't looked at the code either. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#12172) next »