Kunena 7.0.5 & Kunena 6.4.11 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.0.5 [K 7.0.5] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.
The Kunena team is also pleased to announce the eleventh version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.
Question Where to add,change redirect url after login?
If this is the case (and I haven't experimented with it to see whether this idea works) you could use the Joomla "copy module" to create a new instance of the mod_login, assign the copy to a particular page, and define specific redirection parameters to the copy of the mod_login. Would you like to give it a go?
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
- LittleJohn
-
- Offline
- Kunena Contributor
-
Thats not entirely true either, because the link to the login could be posted outside the system too (or within the html of some article), leaving it outside the scope of joomla's handling itself.
I think Ill try go on a discovery trip on the joomla forums for an answer.
Be back later - (hopefully) with some reply.
Please Log in or Create an account to join the conversation.
- LittleJohn
-
- Offline
- Kunena Contributor
-
Its not exactly what I was looking for, but might help somebody.
This page explains how to do an internal redirect after login/logout: docs.joomla.org/How_do_you_redirect_user..._successful_login%3F
A base64_encode of index.php?option=com_pizzapie' yeilds: 'aW5kZXgucGhwP29wdGlvbj1jb21fcGl6emFwaWU='
You just put the string in the end of the login url as 'redirect' parameter. It should look like this:
index.php?option=com_user&view=login&return=aW5kZXgucGhwP29wdGlvbj1jb21fcGl6emFwaWU=
One catch - it only works on base64_encode'd internal urls.
This will work:
localhost/joomla/index.php?option=com_user&view=login&return=aW5kZXgucGhwP29wdGlvbj1jb21fcGl6emFwaWU=
This will not work:
localhost/joomla/index.php?option=com_user&view=login&return=index.php?option=com_pizzapie
localhost/joomla/index.php?option=com_user&view=login&return=com_pizzapie
localhost/joomla/index.php?option=com_user&view=login&return=http://www.disney.com
I guess, if you had a module that redirect the user to external links (like weblinks), you could encode those links and use them.
Dirty work, but you dont have to do any hacking.
And finally, a link to an online base64 encoder/decoder:
www.motobit.com/util/base64-decoder-encoder.asp
Happy redirectin'
Please Log in or Create an account to join the conversation.
- [email protected]
-
- Offline
- New Member
-
- Posts: 1
- Thank you received: 0
To build and encode redirectUrl (as indicated in your post), it would need to capture the unencoded value ("category=" blah blah blah) from the inbound URL. Do you know where that value is captured? What module or where in the code? Is this in Controller.php in comUser?
I'm fine with it being internal URLs only. I just need to know where to record the inbound so I can translate it to the encoded outbound returnUrl.
I'm more than happy to hack it, but I'm not sure where that inbound value is identified.
Please Log in or Create an account to join the conversation.
- LittleJohn
-
- Offline
- Kunena Contributor
-
Please Log in or Create an account to join the conversation.
There are some workarounds, but all require lots of modification (some 5+ files or more), which is hard to trace.
So here is my workaround, for Kunena 1.5.9, Joomla 1.5.15:
Edit one file: ccmponents/com_kunena/template/default/plugin/profilebox/profilebox.php, and make it like below:
...
<?php // AFTER LOGIN AREA
if ($fbConfig->fb_profile == 'cb')
{
$loginlink = CKunenaCBProfile::getLoginURL();
$logoutlink = CKunenaCBProfile::getLogoutURL();
$registerlink = CKunenaCBProfile::getRegisterURL();
$lostpasslink = CKunenaCBProfile::getLostPasswordURL();
}
else if ($fbConfig->fb_profile == 'jomsocial')
{
$loginlink = JRoute::_('index.php?option=com_community&view=frontpage');
$logoutlink = JRoute::_('index.php?option=com_community&view=frontpage');
$registerlink = JRoute::_('index.php?option=com_community&view=register');
$lostpasslink = JRoute::_('index.php?option=com_community&view=frontpage');
}
else
{
$redirectUrl = $_SERVER;
$redirectUrl = base64_encode($redirectUrl);
$redirectUrl = '&return='.$redirectUrl;
//Start of modification
//nttranbao : add "&return=current-page" for Kunena to redirect to current page after log in
$loginlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$logoutlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$registerlink = 'index.php?option=com_user&view=register&Itemid=' . $Itemid ; // registerlink : we dont want it to redirect
$lostpasslink = 'index.php?option=com_user&view=reset&Itemid=' . $Itemid . $redirectUrl;
$loginlink = JRoute::_($loginlink);
$logoutlink = JRoute::_($logoutlink);
$registerlink = JRoute::_($registerlink);
$lostpasslink = JRoute::_($lostpasslink);
//Comment out/delete these 4 lines:
//$loginlink = JRoute::_('index.php?option=com_user&view=login');
//$logoutlink = JRoute::_('index.php?option=com_user&view=login');
//$registerlink = JRoute::_('index.php?option=com_user&view=register&Itemid=' . $Itemid);
//$lostpasslink = JRoute::_('index.php?option=com_user&view=reset&Itemid=' . $Itemid);
}
...
Save. And try for yourself: go to any page, then click login, enter credentials and bump, you are now at the previous page with logged on status.
PS: you can edit the above links to redirect to whereever you want, after login/logout/register or Lostpassword action
Enjoy
Bao Nguyen
Please Log in or Create an account to join the conversation.