- Posts: 3
Joomdle 1.0 Installation
[SOLVED] Internal server error (500) after login when session is expired
- marco cassisa
- Topic Author
- Offline
- New Member
-
Less
More
5 years 11 months ago - 5 years 10 months ago #1
by marco cassisa
[SOLVED] Internal server error (500) after login when session is expired was created by marco cassisa
Hi!
I read other messages on the forum concerning Internal server error, but it seems that my situation is different. Anyway, what I read, didn't help (folder permissions, logout and so on).
If a user is successfully logged in and his/her session is expired, he/she is requested to login again in moodle. Thereafter, an error page appears:
500 Internal server error
the URL is the following one:
mysite-blabla.com/j/index.php?option=com...iew.php%3Fid%3D83848
The user is logged in indeed: it is only a problem of redirect (decoding data parameter? interpreting wantsurl?). - The url is correct by the way -
Thank you if you can help!
Marco
I read other messages on the forum concerning Internal server error, but it seems that my situation is different. Anyway, what I read, didn't help (folder permissions, logout and so on).
If a user is successfully logged in and his/her session is expired, he/she is requested to login again in moodle. Thereafter, an error page appears:
500 Internal server error
the URL is the following one:
mysite-blabla.com/j/index.php?option=com...iew.php%3Fid%3D83848
The user is logged in indeed: it is only a problem of redirect (decoding data parameter? interpreting wantsurl?). - The url is correct by the way -
Thank you if you can help!
Marco
Last edit: 5 years 10 months ago by marco cassisa.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
5 years 10 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Internal server error (500) after login when session is expired
Thanks for the bug report.
Please try this fix:
File: /moodle/auth/joomdle/auth.php
Function: user_authenticated_hook
Change:
By:
File: components/com_joomdle/controller.php
Function: login
Change:
By:
Please try this fix:
File: /moodle/auth/joomdle/auth.php
Function: user_authenticated_hook
Change:
Code:
if (property_exists ($SESSION, 'wantsurl'))
$redirect_url .= '&wantsurl='. urlencode ($SESSION->wantsurl);
Code:
if (property_exists ($SESSION, 'wantsurl'))
$redirect_url .= '&wantsurl='. base64_encode ($SESSION->wantsurl);
File: components/com_joomdle/controller.php
Function: login
Change:
Code:
$wantsurl = $this->input->get('wantsurl', '', 'string');
Code:
$wantsurl = base64_decode ($this->input->get('wantsurl', '', 'string'));
Please Log in or Create an account to join the conversation.