[Solved]: Help making a <a href> with referer, is this possible? [Solved]: Help making a <a href> with referer, is this possible?
 

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

[Solved]: Help making a <a href> with referer, is this possible?

Started by net, March 22, 2008, 09:39:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

net

Hi,

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

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?

Nibbler


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.

net