Author Topic: Session not accessible from outside  (Read 4789 times)

Offline firemail

  • Newbie
  • *
  • Posts: 9
Session not accessible from outside
« on: May 12, 2008, 01:52:53 PM »
Hi I'm a Round CUbe Veteran.
I've installed and modofied almost all plug-ins and have personally worked out all the bugs except for one(1).

When logged in users do a google search they are taken out of roundcube to the results page.

I've looped back the username by captureing the $SESSION['username'] and sending it along with the google query as a hidden field. This allows me to "show" the username outside of round cube. This means I have to appemnd &username=$GET['username'] to every link in the root site.

Can I mod the RoundCube cookie to be accessible from root site?
I don't want to cancel the round cube session and I don't want to have to wrewrite the roundcube cookie in my site.

I would rather use session in root site (once) use $SESSION['username'] instead.
I tried this at top of index.php before all HTML and different variations, but still doesn't work.


if (isset($_SESSION['username']))
{
$username = $_SESSION['username'];
echo "Welcome $username";
}
else
{
$username = $_POST['username'];
session_start();
$_SESSION['username'] = $username;
$Lusername = $_SESSION['username'];
echo "Welcome $Lusername";
}

See it in action : http://baluchon.net/phpsearch/?lang=en
username: phpsearch
password: login
Use the Webmail link to login and do a google search. ( Notice the links in results include a tag!??)

Alex
« Last Edit: May 12, 2008, 01:57:13 PM by firemail »

Offline ar1000

  • Newbie
  • *
  • Posts: 1
Me too!
« Reply #1 on: October 30, 2008, 05:08:30 PM »
I also want external access to the Roundcube session. Help?!?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Session not accessible from outside
« Reply #2 on: October 31, 2008, 02:22:44 AM »
What about to pass the session_id with the URL and then access roundcube database table "session" and unserialize field "vars"?
« Last Edit: October 31, 2008, 04:40:20 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline rnbguy

  • Newbie
  • *
  • Posts: 5
Session not accessible from outside
« Reply #3 on: May 29, 2009, 06:14:14 AM »
can you explain how i can access session_id from main.inc?

ive written a function in main.inc

Offline rnbguy

  • Newbie
  • *
  • Posts: 5
Session not accessible from outside
« Reply #4 on: May 29, 2009, 06:35:40 AM »
ive figured it out, how do you unserialize vars to compare it to session_id?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,330
Session not accessible from outside
« Reply #5 on: May 29, 2009, 07:11:50 AM »
would changing $rcmail_config['session_domain'] in your config help? then you can access the cookies from other subdomains.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦