Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71348

Case sensitive use in cert info for Mobile Settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.17, 3.8.8, 3.9.6, 3.10.3
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
    • Environment:
      Linux Centos 7
    • Database:
      Any
    • Testing Instructions:
      Hide
      • Environment Setup and Configuration
        • Moodle 3.4 thru 3.10
        • OS: CentOS 7
        • PHP: 7.2
        • Curl: 7.76.1 city-fan.org

      Enable web services for mobile devices in Moodle

      1. If not already, log into Moodle as an Administrator
      2. Click Home > Site administration > Mobile app > Mobile settings
      3. Activate the checkbox for Enable web services for mobile devices.

      Reproducing and testing the Issue

      1. Login to Moodle as an Administrator.
      2. Click Home > Site administration > Mobile app > Mobile settings
      3. ISSUE: The message "It seems that the HTTPS certificate for the site has expired." will appear but the certificate is not expired. A debug on the variable $cert in the function get_potential_config_issues from the file /admin/tool/mobile/classes/api.php will reveal that the key ['Expire date'] is written with uppercase (Expire Date) and not with lowercase (Expire date) like it appears on the file. This causes the array to return Null and to show the above warning message. A possible solution would be to check if the both key names are present (lowercase and uppercase).

      Let me know if you have any questions.

      Best regards,

      Ovidiu

      •  
      Show
      Environment Setup and Configuration Moodle 3.4 thru 3.10 OS: CentOS 7 PHP: 7.2 Curl: 7.76.1 city-fan.org Enable web services for mobile devices in Moodle If not already, log into Moodle as an Administrator Click  Home  >  Site administration  > Mobile app > Mobile settings Activate the checkbox for Enable web services for mobile devices . Reproducing and testing the Issue Login to Moodle as an Administrator. Click  Home  >  Site administration  > Mobile app > Mobile settings ISSUE :  The message " It seems that the HTTPS certificate for the site has expired. " will appear but the certificate is not expired. A debug on the variable  $cert  in the function get_potential_config_issues from the file /admin/tool/mobile/classes/api.php  will reveal that the key ['Expire date'] is written with uppercase (Expire Date) and not with lowercase (Expire date) like it appears on the file. This causes the array to return Null and to show the above warning message. A possible solution would be to check if the both key names are present (lowercase and uppercase). Let me know if you have any questions. Best regards, Ovidiu  
    • Workaround:
      Hide

      A possible solution would be to check if the both key names are present (lowercase and uppercase).

      Show
      A possible solution would be to check if the both key names are present (lowercase and uppercase).
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Issue size:
      Small

      Description

      Moodle returns the warning "It seems that the HTTPS certificate for the site has expired" when activating "Enable web services for mobile devices" in Mobile settings, even if the certificate is not expired. The problems is that the curl is case sensitive and does not find the key ['Expire Date'] because Date is written with uppercase D and Moodle expects lowercase d.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ovidiumorariu Ovidiu Morariu
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 3 hours
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified