-
-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#2726 - Set ssl option when using DSN with SSL #20974
Conversation
Can one of the admins verify this patch? |
(Standard links)
|
Jenkins add to white list |
Jenkins add to whitelist |
this seems fine to me @demeritcowboy do you think this will work in this situation or do we need code more like https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/DAO.php#L202 |
This is probably fine I was just going to test it since it's been a year since I last looked at this. In my previous WIP on this I had written a blurb as to why I think this is different from the DAO and why it should NOT do something like the pear static: https://github.com/civicrm/civicrm-core/pull/18125/files |
@seamuslee001 @demeritcowboy Is there any other things I could do to get this PR merged? |
Thanks for kickstarting this again. Normally I'd suggest writing a unit test but since the test nodes don't use SSL that won't work. As an alternative you could review someone else's PR. |
|
Thanks so much for reviewing @demeritcowboy |
@demeritcowboy Thank you so much for reviewing and merging this. just to clarify and for reference on how we could produce the issue with civicrm-setup, as we did not use See below a snippet how the installation was done.
|
Ok thanks - that's interesting because that's very similar to what |
Included CiviCRM 5.41.0 PR: civicrm#20974
Included CiviCRM 5.41.0 PR: civicrm#20974
Included CiviCRM 5.41.0 PR: civicrm#20974
Included CiviCRM 5.41.0 PR: civicrm#20974
Included CiviCRM 5.41.0 PR: civicrm#20974
Included CiviCRM 5.41.0 PR: civicrm#20974
Overview
Refer to issue https://lab.civicrm.org/dev/core/-/issues/2726.
DB::connect()
function requires an options array that definessl=true
for mysqli to connect to the CiviCRM database over ssl connection.This PR adds logic to check if DSN is using SSL then pass the option
ssl=true
Before
Exception was thrown when using DSN with SSL to connect the database.
Cannot open mysqli://user:password@local:3306/civicrm_db?new_link=true&ca=%2Fetc%2Fmysql%2Fdatabase-certificate.pem: DB Error: connect failed
After
No error is thrown when using DSN with SSL.