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: [Solved]: Help making a <a href> with referer, is this possible?  (Read 1486 times)

0 Members and 1 Guest are viewing this topic.

net

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88

Hi,

I've added your documented "hack" in displayimage.php to tell users to register and login to view full image

Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to <a href=register.php><u>register</u></a> and <a href=login.php><u>login</u></a> to view this page', __FILE__, __LINE__);
This works great, but i saw that the true login button does refer to the actual page the user was on when he clicked the login button, so once hes logged on he will be kicked back to the image he was trying to display.

I checked include/themes.inc.php to see what code is done and it seems that i need to add "login.php?referer=$REFERER" however this does not seem to work in html, any clue how i could do it another way?
« Last Edit: March 23, 2008, 09:00:26 am by Sami »
Logged

Nibbler

  • Guest
Re: Help making a <a href> with referer, is this possible?
« Reply #1 on: March 22, 2008, 10:02:16 pm »

Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to <a href="register.php">register</a> and <a href="login.php?referer='.$REFERER.'">login</a> to view this page', __FILE__, __LINE__);

Should work.
Logged

net

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: Help making a <a href> with referer, is this possible?
« Reply #2 on: March 23, 2008, 03:58:54 am »

Thanks once again Nibbler, you are much helpful!
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.