-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.0.3
-
None
-
MOODLE_30_STABLE
Our Moodle sites with a path component in wwwroot fail to register with the hub. Upon inspecting the hub source code, the problem appears to be combination of things:
- Hub's is_remote_site_valid allows only three redirects.
- With a wwwroot of https://moodle.u.edu/2.8, Hub will not automatically add the trailing slash, but will make a request without the trailing slash, thereby using up one of the redirects to get the trailing slash.
- Hub accepts a 302 as a positive response, but keeps following 303 redirects.
Please either increase the number of allowed redirects, automatically add a trailing slash to wwwroot, and/or accept 303 as a positive response.
To confirm that this is the cause of our failure to register, I modified the registration page to register with the trailing slash. That caused Hub to skip the first redirect and registration succeeded. (I am guessing that hacking the registration page to register with the trailing slash is not reliable way to proceed.)