base64 login redirect not working

14 years 1 day ago #131212 by karlja
Replied by karlja on topic Re:base64 login redirect not working
Hi,

I checked my installation and the return-string of the page where the CB login module is shown is the right one and can be printed out in the CB login module. It seems that the string is just not being processed.

I disabled the Joomla login with a dirty core hack by emptying the default_login.php-view in com_user.

Regards,
Karlja

Please Log in to join the conversation.

13 years 11 months ago #131360 by krileon
Replied by krileon on topic Re:base64 login redirect not working
Not sure what to advise, sorry. It's possible Joomla is stepping in and preventing the redirect. There are Joomla system plugins available that disable Joomla login page and send users to CBs login page. I recommend searching JED for such extension.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 11 months ago #131421 by karlja
Replied by karlja on topic Re:base64 login redirect not working
Well, on the page originally showing the Joomla login in the body, the CB login module is also shown. So by just disabling the Joomla login view, I do not have to do a second redirect and should therefore be able to have access to the right return string.

With the Joomla login (now disabled) the return after login worked perfectly fine but seems not to be processed right in the CB login module.
I looked into the http header of the login post operation and found that a different return string is passed on.

What additional task are performed on the return string and why?

Regards,
Karlja

Please Log in to join the conversation.

13 years 11 months ago #131503 by krileon
Replied by krileon on topic Re:base64 login redirect not working
Nothing additional is done to formulate the return string, you can see the code which handles the return string within CB Login modules PHP file. If you've suggestions we're certainly open to them; otherwise you may need to make modifications to meet your needs.

Again, CB can't redirect two URLs deep; which when trying to access a protected URL a user is redirected to the protection page.

CB can't redirect back to the URL which was previously attempted to access as a new redirect was performed sending user to protected page, which then can't be accessed because user is now logged in; so user is sent to frontpage (should be at least in most cases).

You can obtain a Joomla plugin which redirects from Joomlas protection page to CBs login page if you like, but still won't remedy your issue.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 11 months ago #131526 by vcardillo
Replied by vcardillo on topic Re:base64 login redirect not working
krileon wrote:

Again, CB can't redirect two URLs deep; which when trying to access a protected URL a user is redirected to the protection page.


It doesn't need to.

CB can't redirect back to the URL which was previously attempted to access as a new redirect was performed sending user to protected page, which then can't be accessed because user is now logged in; so user is sent to frontpage (should be at least in most cases).

You can obtain a Joomla plugin which redirects from Joomlas protection page to CBs login page if you like, but still won't remedy your issue.


But this is how Joomla works, core functionality, out of the box. krileon, what myself and other users are saying, is that the CB login module is lacking core functionality that Joomla already has.

If I am using Joomla's core login module and try and access a restricted page, then I am redirected to the page I was trying to access after logging in.

This does not happen at all with CB, even though the correct base_64 encoded URL is in the URL.

If you want to see what we're talking about, I can probably setup a demo to prove to you that the CB login module is in fact lacking/not performing/breaking core functionality that Joomla has out of the box.

- vince

Please Log in to join the conversation.

13 years 11 months ago #131538 by karlja
Replied by karlja on topic Re:base64 login redirect not working
If you output all GET variables in the login module when being redirected to the login from a restricted site, you get a return string, which can be easily decoded back to the original URL, but using CB login module version 1.2 RC3 from February 2010, it says in line 673:
[code:1]echo '<input type="hidden" name="return" value="B:' . base64_encode( $login ) . '" />'."\n";[/code:1]

So the CB login module modifies the return string further and there seems to be a problem with the encoding / decoding of that string.
I tried just sending the original return string, but this is also not decoded correctly when logging in.

So the redirect on login is not a problem of remembering two URLs (since there is no second redirect before login), but seems to be processed different in the CB login module / component than in the Joomla core.

Hope you can help on this problem and maybe have an idea on why this different way is used.

Thank you.
Karlja

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.257 seconds

Facebook Twitter LinkedIn