& in URL changing to & when logging in & in URL changing to & when logging in
 

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

& in URL changing to & when logging in

Started by Tranz, February 16, 2005, 02:27:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tranz

Let's say I'm viewing an image in an album and decide to log in.

I get redirected to a URL where the & was changed to & and so the link is invalid and get the following message:
QuoteThe selected album/file does not exist !

If I edit the & in the URL, it will work.

Just ran a CVS update today.

nol33t

That bug was starting to tickle me on my dev gallery, so in case nobody had the time to fix it yet ( checked at the CVS, don't look like ):

in login.php,

before to call

pageheader($lang_login_php['login'], "<META http-equiv=\"refresh\" content=\"3;url=$referer\">");


$referer has to have "&amp;" replaced by "&"

the nice way is to add before

$referer=html_entity_decode($referer);

however that function is for php >= 4.3

an every php version working fix is to add before the line

$referer=preg_replace("'&amp;'","&",$referer);


hope that helps
-matt-

Joachim Müller

committed fix as suggested, please confirm.

Joachim

Tranz