Bridging the other way! Bridging the other way!
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Bridging the other way!

Started by jeremy70, October 11, 2011, 08:40:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jeremy70

Hello,
I have read the forum rules and I don't have a public install of this app to give you as it is sitting on my dev machine. (you shouldn't need to "see" it anyway as this is in the logic)

Ok this is the fun part...
I am using the latest and greatest version of coppermine.

I really like this app and I am trying to get http://sourceforge.net/projects/webcalendar/ to use coppermine's session/cookies.  You have a better more secure log in system... ie more complex.
I have already been able to make both coppermine and webcalendar use the same user table and all the memembers are shared no problems.  The problem being you still have to log in 2 times.
Webcalendar does have something very similar to coppermine's bridging were it will totally throw out the login to use another applications login. Have any of you delt with this?
I have been bustin my head against the desk for the last 3 hours trying to bring all the session/login stuff from coppermine into webcalendar.
Thanks in advance!
Jer



oh and a p.s.   HOLY moly @ the captchas on this forum! lol  :o

jeremy70

forgot to add that the file structure is....

---Root (www)
        |
        |
        --[gallery]
        |
        --[calendar]
        |
        |
        -index.php
        -etc.php
        -etc.php

Αndré

Quote from: jeremy70 on October 11, 2011, 08:40:42 PM
I have been bustin my head against the desk for the last 3 hours trying to bring all the session/login stuff from coppermine into webcalendar.

FYI: when you bridge Coppermine to another application Coppermine redirect to the application's login form. With the above information I guess you don't want to use Coppermine's login form, but rebuilt it within webcalendar? Maybe I misunderstood your current issue. If so, please try to explain it again.

jeremy70

Actually I want to use coppermine as the main application with the login from that but being able to use the session/cookies in the webcalendar so basically a single sign on for both applications. Again I have already integrated both applications to use the same member table, it's just the session/cookie chunk that I am having problems with.   I can bypass the webcalendar's login and use my own but not sure how to exactly set the cookie/session so that it will work for both applications.

Αndré

To detect the session value you need to do the following:

1. Create an md5 hash of $_SERVER['HTTP_USER_AGENT'] + $CONFIG['ecards_more_pic_target']
$cookie_name = md5($_SERVER['HTTP_USER_AGENT'].$CONFIG['ecards_more_pic_target']);

2. Read the the content of that cookie
$cookie_value = $_COOKIE[$cookie_name];

3. Create an md5 hash of the cookie's value + name
$session = md5($cookie_value.$cookie_name)


You don't need to create the cookie/session, as this will be done automatically when you use the Coppermine login form. Of course you can do that yourself with your own login form.