-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
2.5
Example:
I have a site with wwwroot = 192.168.1.10/mymoodle. I add that site in the app, so it's stored with that URL. Then I change that value to localhost/mymoodle. The requests performed from the app from now on will have this answer:
<!DOCTYPE html>
|
<html lang="en" xml:lang="en">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="refresh" content="3; url=http://192.168.1.48/moodlemaster" />
|
<title>Redirect</title>
|
</head><body><div style="margin-top: 6em; margin-left:auto; margin-right:auto; color:#990000; text-align:center; font-size:large; border-width:1px;
|
border-color:black; background-color:#ffffee; border-style:solid; border-radius: 20px; border-collapse: collapse;
|
width: 80%; -moz-border-radius: 20px; padding: 15px">
|
Incorrect access detected, this server may be accessed only through "http://192.168.1.48/moodlemaster" address, sorry.<br />Please notify server administrator.
|
</div><!DOCTYPE html>
|
<html lang="en" xml:lang="en">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>Redirect</title>
|
</head><body><div style="margin-top: 3em; margin-left:auto; margin-right:auto; text-align:center;">This page should automatically redirect. If nothing is happening please use the continue link below.<br /><a href="http://192.168.1.48/moodlemaster">Continue</a></div></body></html></body></html>
|
$mmWS doesn't detect this as an error, so this string is passed as the success of the call, causing some errors in the app. E.g. in $mmaCalendar#getEvents we perform courses.push with that response, so we get an exception because it's not an array. I also got an error like "Cannot read property length of undefined" when I restarted the app.
The service performing the request needs to check if the returned data is valid, but maybe it'd be useful to detect this type of error in $mmWS if it's feasible.
- caused a regression
-
MOBILE-1305 mod_chat not working: You are not logged in
-
- Closed
-