Re: cvs: /php3 ChangeLog

From: Date: Wed, 24 Nov 1999 19:52:55 +0000
Subject: Re: cvs: /php3 ChangeLog
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-13073@lists.php.net to get a copy of this message
On Wed, Nov 24, 1999 at 02:42:52PM -0500, Rasmus Lerdorf wrote: > > Yeah, I know. That's what I have been looking at doing, but it isn't a > 10-minute hack. I need to set aside a couple of hours to make sure it is > done right. However, I am starting to think that we shouldn't do this in > PHP 3 and as such I think mysql_change_user() should be yanked from the > 3.0 code, or limited to work on non-persistent connections only. I vote for applying the attached patch and releasing 3.0.13 ASAP. -- Regards, Sascha Schumann Consultant

Index: mysql.c =================================================================== RCS file: /repository/php3/functions/mysql.c,v retrieving revision 1.190 diff -u -r1.190 mysql.c --- mysql.c 1999/11/05 21:28:38 1.190 +++ mysql.c 1999/11/24 19:51:22 @@ -801,6 +801,10 @@ php3_error(E_WARNING,"%d is not a MySQL link index",id); RETURN_FALSE; } + if (type==MySQL_GLOBAL(php3_mysql_module).le_plink) { + php3_error(E_ERROR,"Cannot change username of a persistent connection"); + RETURN_FALSE; + } if (mysql_change_user(mysql, user ? user->value.str.val:NULL, passwd ? passwd->value.str.val:NULL,
« previous php.dev (#13073) next »