-
Bug
-
Resolution: Fixed
-
Minor
-
3.4.7, 3.5.4, 3.6, 3.7, 3.9.2
-
MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_39_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
If you visit the admin/settings.php?section=mobilesettings page on a moodle site 3.4 or greater that has a valid certificate, moodle will perform a check in admin/tool/mobile/classes/api.php
if ($cert['Signature Algorithm'] == 'sha1WithRSAEncryption' || $cert['Signature Algorithm'] == 'sha1WithRSA') { |
But you will get a php error notice that the $cert['Signature Algorithm'] index is undefined.
Notice: Undefined index: Signature Algorithm in /var/www/site/admin/tool/mobile/classes/api.php
|
That's because the curl does not parse the returned json data correctly. What we see is
'Public Key Algorithm' => string(72) " Signature Algorithm: sha256WithRSAEncryption sha256WithRSAEncryption" |
in the certinfo section of the returned curl data. What we should see is 'Signature Algorithm' having its own element in the associative array, not be part of this string.
To reproduce this error:
- Turn on debug display and developer in a moodle site 3.4 or greater.
- If on a development site, in the code you can change the line in admin/tool/mobile/classes/api.php
$curl->head($httpswwwroot . "/$CFG->admin/tool/mobile/mobile.webmanifest.php"); |
to a site with a valid certificate, eg.
$curl->head("https://www.google.com"); |
3. Load the admin/settings.php?section=mobilesettings page and observe the php notices. Happens in php 5.6, 7.0, 7.2.
This is not a problem directly in moodle, rather with curl upstream: https://github.com/curl/curl/issues/3706 . But it will produce errors in moodle sites on this page.
This is now fixed upstream.
- Discovered while testing
-
MDLQA-15254 CLONE - Mobile service is enabled by default on secure server
-
- Passed
-
- has been marked as being related by
-
MDL-71348 Case sensitive use in cert info for Mobile Settings
-
- Closed
-
- is duplicated by
-
MDL-69198 Notice: Undefined index: Signature Algorithm when searching for mobile app settings
-
- Closed
-