Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Coppermine 1.4.x Cookie Information  (Read 3721 times)

0 Members and 1 Guest are viewing this topic.

rmatakajr

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Coppermine 1.4.x Cookie Information
« on: April 28, 2009, 12:11:50 am »

Hi,

Im new to coppermine, but not to PHP I have accomplished creating a custom bridge from my application
to coppermine using HTTP techniques, in other words i did not mess with any core files or bridge settings.

I didnt want to bother you guys but i have been searching Google and the forums all day with no luck. I just need
to know what I must set in the cookie for coppermine to reconize the login. This way i can set the
cookie from my application so coopermine thinks the user is logged in. I looked through the bridge files and
includes and dont see where this is being set?

Any help is appreciated.

Thanks
Rick
Logged

Nibbler

  • Guest
Re: Coppermine 1.4.x Cookie Information
« Reply #1 on: April 28, 2009, 12:26:13 am »

Did you actually make a custom bridge file or are you trying to do it all backwards?

Maybe http://forum.coppermine-gallery.net/index.php/topic,45376.0.html can help you.
Logged

rmatakajr

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Coppermine 1.4.x Cookie Information
« Reply #2 on: April 28, 2009, 03:50:48 am »

Hi Nibbler,

Thanks for the reply. Im actually doing it all backwards! Basicly I created a file that sits in CPG enviroment
and adds a user to the database.. I use some fopen with headers to emulate a post method to this file
which in return adds the user to coppermine and then echos the user_id in return (on success that is!)

Anyhow i just need to know what i have to set in the cookie after this is done so the user is logged into
coppermine.

I see from your post you would

Code: [Select]
$this->client_id = md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['SERVER_PROTOCOL'].$CONFIG['site_url']);
Then

Code: [Select]
$sessioncookie = $_COOKIE[$this->client_id];
Then we concat like you said

Code: [Select]
$session_id = $sessioncookie.$this->client_id;
But now you are checking for a session in the DB.. at this point there i need to just

Code: [Select]
setcookie(cpg_data??)
and be done with it! Well for that browser session that is..

I appreciate your help in advance

Rick!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.