-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
Per bug #76651 these changes do not appear to work correctly in some cases. As no immediate fix seems to be forthcoming, I'm reverting these changes. Revert "Fixed invalid free introduced by d6e81f0 (avoid keeping "invalid" pointer)" This reverts commit 11507c0. Revert "Fix mysqlnd build without openssl" This reverts commit 6c9db02. Revert "Fix VC compilation as variable size array is not supported" This reverts commit f96df64. Revert "Fix MySQL 8 auth" This reverts commit d6e81f0.
- Loading branch information
There are no files selected for viewing
9 comments
on commit 03740ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you revert and break all installations that relied on this with no mention in changelog? Makes no sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this has already been part of stable releases, this is quite a serious BC break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that this change never made it into the changelog. Unfortunately the implementation of this functionality was not correct and broke existing installations. I would have preferred it if the issues were fixed instead, but this did not happen and I had to revert this entirely instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikic the authentication method is there since 7.2.4 and from what I see the mentioned bug was for 7.2.8, were all the reverts needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Destroy666x This authentication method was added in PHP 7.1.19 and PHP 7.2.8. It was certainly not present in PHP 7.2.4 mysqlnd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly sure I didn't change default authentication method in 7.2.5 and 7.2.7 and it worked. Documentation also suggests that starting version for PDO at least: http://php.net/manual/en/ref.pdo-mysql.php It's also misleading for 7.2.11+ now.
Anyways, regardless of that, it's a BC break caused by revert to fix a BC break, which is not nearly any better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 7.2.4 fixed auth plugin negotiation to retry authentication using mysql_native_password. This did not get reverted.
The only thing that was reverted is explicit support for caching sha2 auth. As long as your server still supports mysql_native_password things should continue to work, as between PHP 7.2.4 and 7.2.8.
If PHP 7.2.5 worked for you and 7.2.11 does not, without a change to the MySQL configuration (either explicitly, or implicitly through an update), then I'm stumped as to what is going on here. Can you please check which authentication methods are supported on your MySQL server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 7.2.4 fixed auth plugin negotiation to retry authentication using mysql_native_password. This did not get reverted.
Hmmm, if that's the case it doesn't work as you mentioned. Both methods are supported on my local server, MySQL 8.0.13 on Docker. And I'm not alone: https://bugs.php.net/bug.php?id=77113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly sure I didn't change default authentication method in 7.2.5 and 7.2.7 and it worked.
I upgraded from an earlier version of PHP 7.1.x to PHP 7.2.8, and it automatically switched my MySQL 8.x database over to caching_sha2_password in the process. From what I've read elsewhere, this method existed as far back as PHP 7.2.4 or 7.2.5. Are you sure you upgrading PHP didn't automatically change the method for you too?
Edit: Probably worth mentioning that I upgraded MySQL at the same time, so now that I think about it, that may have been what triggered the method update. Not sure if MySQL 8.x automatically detects whether this is supported on install or not and adjusts the database accordingly.
I think the main bug here was that the auth plugin was always registered and the implementation then checked for SSL support and errored out in that case. Instead this line should be part of the
MYSQLND_HAVE_SSL
block, so the plugin is not visible when openssl is not supported.This still leaves the issue of the hard-dependency on ext/hash. I think with this fixed we could at least reapply this on master, as ext/hash is required there anyway.