summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_auth.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-04-031-1/+1
|\ | | | | | | | | * PHP-7.3: Fix incorrect free for last_message
| * Fix incorrect free for last_messageQianqian Bu2020-04-031-1/+1
| | | | | | | | | | | | | | | | In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message field of the connection object was changed to be always non-persistent. But there is a place on change_user path that still treats it depending on conn->persistent flag. This will cause PHP crash after com_change_user success when there is last_message set
* | Fix leak on Windows as wellChristoph M. Becker2020-03-231-0/+5
| | | | | | | | Cf. <http://git.php.net/?p=php-src.git;a=commit;h=db08ef0d3274b239a6b9e68d71d02bb6acb71d82>
* | Fix RSA memory leak in mysqlnd authNikita Popov2020-03-231-0/+3
| |
* | Native Windows support for mysqlnd sha256 authentificationChristoph M. Becker2020-03-021-0/+129
| | | | | | | | We implement that on top of Cryptography API: Next Generation (CNG).
* | Abstract over crypto operationsChristoph M. Becker2020-03-021-61/+77
| |
* | Don't use VLA in mysqlnd authNikita Popov2020-02-181-2/+8
| | | | | | | | | | We use alloca instead of VLA. This should also allow building this code on Windows.
* | Fixed bug #79011Nikita Popov2020-01-241-1/+7
| | | | | | | | | | | | auth_plugin_data_len here is 21, including the trailing null byte. Directly use SCRAMBLE_LENGTH instead. Also add a sanity check that the provided scramble is long enough.
* | Handle empty password fast path in caching_sha2_passwordNikita Popov2019-12-271-1/+6
| | | | | | | | | | | | If an empty password is used, no additional packets are exchanged during caching_sha2_password auth. We're only looking for an OK/ERR response.
* | Handle error response during caching_sha2_password authNikita Popov2019-12-271-0/+7
| | | | | | | | In particular, this fixes handling of expired passwords.
* | Add support for caching_sha2_password in change user authenticationNikita Popov2019-12-271-0/+13
| | | | | | | | Same as for connection handshakes.
* | Fix unix socket check during caching_sha2_passwordNikita Popov2019-12-271-3/+11
| | | | | | | | | | | | | | | | The fact that conn->unix_socket is set does not mean that a Unix socket is actually in use -- this member is set in a default configuration. Instead check whether a unix_socket stream ops is used.
* | Support auth switch request during caching sha2 authNikita Popov2019-12-271-9/+23
| |
* | Free RSA public key in mysqlnd sha256 authNikita Popov2019-12-111-0/+1
| | | | | | | | Not sure why this only started showing up as a leak now.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-08-201-0/+3
|\ \ | |/ | | | | | | * PHP-7.3: fix the problem for connect_attr, set db condition, and add a new attribute _server_host
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-08-201-0/+3
| |\ | | | | | | | | | | | | * PHP-7.2: fix the problem for connect_attr, set db condition, and add a new attribute _server_host
| | * fix the problem for connect_attr, set db condition, and add a new attribute ↵Qianqian Bu2019-08-201-0/+3
| | | | | | | | | | | | _server_host
* | | Fix typo in error messageFabien Villepinte2019-02-211-1/+1
| | |
* | | Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-2/+2
| | | | | | | | | | | | | | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* | | Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Simplify the command factoryAndrey Hristov2019-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since more than an year it not possible to create commands in the heap but they are allocated on the stack and directly run. In this regard, it doesn't make sense to have all the vararg stuff. Commands made sense to be created and pushed onto a stack then a general executor will run thru the stack and execute/handle the commands.
* | | Mark const what should not be changedAndrey Hristov2019-01-071-36/+36
| | |
* | | Re-commit MySQL 8 cached SHA auth supportNikita Popov2018-11-211-7/+276
|/ / | | | | | | | | | | | | | | | | With changes to (hopefully) correctly fall back if OpenSSL support is missing. Furthermore the hard-coded dependency on ext/hash is no longer an issue, as this extension is required in master. This reverts commit 63072e9c0ebbb676cd39d0f867d873737c676add, reversing changes made to 4cbabb6852d2a7d966fb78a53d9d4c1cac18f10b.
* | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-09-041-282/+7
|\ \ | |/
| * Revert all MySQL auth related changesNikita Popov2018-09-041-286/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 d6e81f0bfd0cb90586dd83d4fd47a4302605261a (avoid keeping "invalid" pointer)" This reverts commit 11507c0e1bfa17a96480f3648397f6975c31551e. Revert "Fix mysqlnd build without openssl" This reverts commit 6c9db02ff7812c298d1e7e292ba731d9d3a66790. Revert "Fix VC compilation as variable size array is not supported" This reverts commit f96df64cb2219fda42ca875483f874cf3052647c. Revert "Fix MySQL 8 auth" This reverts commit d6e81f0bfd0cb90586dd83d4fd47a4302605261a.
| * Fix mysqlnd build without opensslNikita Popov2018-06-101-0/+1
| | | | | | | | | | Cherry-pick of 968eb0b38cc9095d418beb8f0df08c4b9abdb079, as these changes were also introduced in lower branches.
* | Fix typos in codePeter Kokot2018-07-271-1/+1
| |
* | Fix mysqlnd build without opensslNikita Popov2018-06-091-0/+1
| |
* | Merge branch 'master' of git.php.net:/php-srcJohannes Schlüter2018-06-061-1/+1
|\ \
| * | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-1/+1
| | | | | | | | | | | | where we sure about string persistence.
* | | Merge branch 'PHP-7.1'Johannes Schlüter2018-06-061-7/+281
|\ \ \ | |/ / |/| / | |/
| * Fix MySQL 8 authJohannes Schlüter2018-06-061-7/+285
| |
* | Merge branch 'PHP-7.2'Johannes Schlüter2018-02-201-1/+1
|\ \ | |/
| * Fix a memleak with mysqlnd and SSLJohannes Schlüter2018-02-201-1/+1
| |
* | Merge branch 'PHP-7.2'Johannes Schlüter2018-02-201-8/+15
|\ \ | |/
| * Merge branch 'PHP-7.0' into PHP-7.1Johannes Schlüter2018-02-201-8/+15
| |\
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Run mysqlmd commands in one step (without separate create/run/free).Dmitry Stogov2017-11-141-5/+1
| | |
* | | Use stack-allocated packets.Dmitry Stogov2017-11-141-123/+101
| | |
* | | Made "result", "statement" and "last_message" to always use Zend MM heap. ↵Dmitry Stogov2017-11-021-1/+1
| | | | | | | | | | | | (even for persistent connections these entities don't relive request boundary)
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|/ /
* | Merge branch 'PHP-7.0'Andrey Hristov2016-03-161-5/+4
|\ \ | |/
| * Fix emails in headers. @mysql.com addresses are no more since many years.Andrey Hristov2016-03-161-5/+5
| |
* | Merge branch 'PHP-7.0'Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | | | | | * PHP-7.0: Update header to PHP Version 7 Happy new year (Update copyright to 2016) Happy new year (Update copyright to 2016)
| * Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
| |\ | | | | | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| | * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| | |
| | * bump yearXinchen Hui2015-01-151-1/+1
| | |