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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fjanisze@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Nov 21 14:01:29 2024 UTC