Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: & in URL changing to & when logging in  (Read 4553 times)

0 Members and 1 Guest are viewing this topic.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
& in URL changing to & when logging in
« on: February 16, 2005, 02:27:06 am »

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:
Quote
The selected album/file does not exist !

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

Just ran a CVS update today.
« Last Edit: February 23, 2005, 07:33:58 am by TranzNDance »
Logged

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: & in URL changing to & when logging in
« Reply #1 on: February 23, 2005, 04:44:01 am »

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
Code: [Select]
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
Code: [Select]
$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
Code: [Select]
$referer=preg_replace("'&amp;'","&",$referer);

hope that helps
-matt-

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: & in URL changing to &amp; when logging in
« Reply #2 on: February 23, 2005, 06:09:42 am »

committed fix as suggested, please confirm.

Joachim
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: & in URL changing to &amp; when logging in
« Reply #3 on: February 23, 2005, 07:33:44 am »

Thanks, it worked in IE, FF, Opera.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.