• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with SSO redirect on PM

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using SSO based on Cookies to integrate the login from the main site to our forums. The redirection seems to work on everything except Private Messages. When users try to PM before the are logged in, they are redirected to a hodge podge url :

http://www.virtuaguild.com/forumhttp://www.virtuaguild.com/login.jsp/forum/pm/sendTo/4.page

Not sure what the first and last half of this URL is, but the middle : http://www.virtuaguild.com/login.jsp is our login redirect. Any thoughts on what I need to fix?

So you can see in action, my post that i found the error on is at http://www.virtuaguild.com/forum/posts/list/3.page

Thanks,
[originally posted on jforum.net by rdtreefrog]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like a bug. I'll check.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This bug is now fixed. The Jira issue is http://www.jforum.net/jira/browse/JF-604

The new code is different that the suggestion posted in the issue page, but if you want to get it working with 2.1.7 instead of waiting for JForum 2.1.8 you can try to hack the source code yourself using that code, that should work ok too.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i thought it was a problem with something i configured! thanks for the sanity check and the fix

Addendum: I edit the forum with your changes, and got mostly there, but the URL still had problems. I had to change the last part of contextToLogin to remove the encodedPath portion before it would properly redirect. I dont think this is the right solution, but until I get better with the code, it seems to work.

//log.debug("contextToLogin() SSO_REDIRECT='"+contextPath+redirect+"'");
//log.debug("contextToLogin() encodedPath='"+encodedPath+"'");

if (redirect != null && redirect.trim().length() > 0) {
JForumExecutionContext.setRedirect(contextPath + redirect.trim() ); // + encodedPath);
}
}

[originally posted on jforum.net by rdtreefrog]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What was the problem you had with the encoded path?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It came out like this:

http://www.virtuaguild.com/login.jsp/forum/pm/sendTo/4.page


[originally posted on jforum.net by rdtreefrog]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect! And very very pretty -- I actually understood what the code was doing, which is a miracle for me

Thanks.
[originally posted on jforum.net by rdtreefrog]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here's the code I did. It should work for you.



Rafael
[originally posted on jforum.net by Rafael Steil]
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic