question-circle Redirect back to restricted page doesn't seem to be working

More
8 months 2 weeks ago #11031 by arcascomputing
Hi Carsten

Just to let you know that, with much further testing and investigation, I think I have found the source of the issue and that is that Edocman was supplying a relative URL for the return URL for the VIEW DOCUMENT view but not for the DOWNLOAD DOCUMENT view - the latter worked, the former didn't.

I realised this when using a BASE64 tool to decode to the return URL and noticed that it was missing the full https://etc. prefix in the case which wasn't working. I therefore tweaked the code which generated that URL slightly and test again to make sure it had the full URL in there, then checked the login on redirection again and it works perfectly now.

I believe that's it sorted anyway!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #11032 by carsten888
wow thanks for sharing. I will make a FAQ with that. Thanks!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #11036 by carsten888
Can you explain how you hacked Edocman to fix this?

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #11053 by arcascomputing
Hi Carsten

Sure, the issue was with the file at components/com_edocman/view/document/html.php and I changed the following:
LINE 45

$returnUrl = base64_encode(JRoute::_(EDocmanHelperRoute::getDocumentRoute($id, $state->catid, $this->Itemid)));

Changed to:

$returnUrl = base64_encode(JRoute::_(JURI::base().EDocmanHelperRoute::getDocumentRoute($id, $state->catid, $this->Itemid)));

So I simply added in the JURI::base(). bit to the start of the url encoding to ensure a full absolute path was included rather than a relative one. I should point out that we have sh404SEF installed which handles rewriting URLs as well as .htaccess rules to ensure traffic is all routed through https and www, so I can't be sure that it's a bug/issue with Edocman itself, however doing the above certainly fixed the issue for us.

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #11055 by carsten888
thank you!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #11056 by arcascomputing
You're welcome!

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum
 
spicy-sacerdotal