php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80344 mysqlnd support for SASL SCRAM-SHA-1 and SCRAM-SHA-256 authentication
Submitted: 2020-11-09 15:39 UTC Modified: 2020-11-09 15:39 UTC
From: fjanisze@php.net Assigned: fjanisze (profile)
Status: Analyzed Package: MySQL related
PHP Version: 7.4.12 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
24 - 21 = ?
Subscribe to this entry?

 
 [2020-11-09 15:39 UTC] fjanisze@php.net
Description:
------------
The authentication methods SCRAM-SHA-1 and SCRAM-SHA-256 have to be supported, this issue is about adding support for them in mysqlnd.

Test script:
---------------
<?php
$link = mysqli_connect("127.0.0.1", "user", "pass");
 
// Check connection
if($link === false){
    die("ERROR: Could not connect. " . mysqli_connect_error());
}
 
// Print host information
echo "Connect Successfully. Host info: " . mysqli_get_host_info($link) . PHP_EOL;

if ($result = $link->query("SHOW DATABASES")) {
  echo "Returned rows are: " . $result->num_rows . PHP_EOL;
  // Free the result set
  $result->free_result();
}

?>

Expected result:
----------------
Given the script and assuming that 127.0.0.1 runs a mysql server configured with LDAP SASL and auth method SCRAM-SHA-1 or SCRAM-SHA-256 for the user "user", the script succeeds and the query works.

Actual result:
--------------
The connection will fail since mysqlnd is not able to authenticate, at the moment LDAP SASL is not supported in the client but the server does support those methods.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-09 15:39 UTC] fjanisze@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: fjanisze
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 12:01:30 2024 UTC