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

Incorrect param type for tool_mobile/forcedurlscheme setting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.4, 3.8.1
    • Fix Version/s: 3.7.5, 3.8.2
    • Component/s: Other
    • Labels:
    • Testing Instructions:
      Hide

      Test saving the setting

      1. Log in as admin.
      2. Go to Site administration > Mobile app > Mobile authentication.
      3. In the field forcedurlscheme, enter the value "mmlearn-moodle" and save changes. Check that no error is displayed and the value is stored.

      Test launch.php

      1. Log in as admin.
      2. Go to "Site administration > Mobile app > Mobile settings" and enable "web services for mobile devices".
      3. Go to "Site administration > Mobile app > Mobile authentication" and set "Type of login" to "Via a browser window (for SSO plugins)".
      4. Log out.
      5. Now open the following URL in a new tab. Please notice you need to replace the SITEURL with your site URL:

        http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=my-0scheme.a%2Bb

      6. Check that you're redirected to the login screen.
      7. Now open the following URL. Please notice you need to replace the SITEURL with your site URL:

        http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=0scheme

      8. Check that you see an error saying: Invalid parameter: the value of urlscheme isn't valid...
      9. Now open the following URL. Please notice you need to replace the SITEURL with your site URL:

        http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=my_scheme

      10. Check that you see an error saying: Invalid parameter: the value of urlscheme isn't valid...
      Show
      Test saving the setting Log in as admin. Go to Site administration > Mobile app > Mobile authentication. In the field  forcedurlscheme , enter the value "mmlearn-moodle" and save changes. Check that no error is displayed and the value is stored. Test launch.php Log in as admin. Go to "Site administration > Mobile app > Mobile settings" and enable "web services for mobile devices". Go to "Site administration > Mobile app > Mobile authentication" and set "Type of login" to "Via a browser window (for SSO plugins)". Log out. Now open the following URL in a new tab. Please notice you need to replace the SITEURL with your site URL: http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=my-0scheme.a%2Bb Check that you're redirected to the login screen. Now open the following URL. Please notice you need to replace the SITEURL with your site URL: http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=0scheme Check that you see an error saying: Invalid parameter: the value of urlscheme isn't valid... Now open the following URL. Please notice you need to replace the SITEURL with your site URL: http://SITEURL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=a&urlscheme=my_scheme Check that you see an error saying: Invalid parameter: the value of urlscheme isn't valid...
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.7 Branch:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-67767-master

      Description

      According rfc2396 custom URL schemes should start with a letter (upper or lower case), and can contain letters (upper and/or lower case), numbers, and the following characters: "+", "-" and "."

      Right now, we are forcing PARAM_ALPHANUM for the setting so schemes like: mmlearn-moodle are not properly working.
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dpalou Dani Palou
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Juan Leyva
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Mar/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m