View Full Version : Failure to correctly escape 'special characters' - [FIXED IN 2.01]
DavidW
4th of October 2006 (Wed), 13:25
Many of my photo filenames contain # characters. The gallery code correctly escapes this in URLs as %23 - but parts of the administration code (including EDITOR_photo_order.php, EDITOR_list.php and EDITOR_photo.php) fail to do so, leading to missing thumbnails and microthumbs.
David
DavidW
4th of October 2006 (Wed), 14:16
Fix - line 1394 of basecode/SCRIPT_common_functions.php
Change code to read:
$url = $urli . urlencode($filename);
Pekka - can you verify that this is a valid fix?
David
Pekka
4th of October 2006 (Wed), 14:44
Thanks, a good catch!
For the path also:
$url = rawurlencode($urli . $filename);
I have used rawurlencode but I don't think the difference is significant here.
DavidW
4th of October 2006 (Wed), 15:03
We'll have to compromise on
$url = $urli . rawurlencode($filename);
If you run the path through either rawurlencode() or urlencode(), it gets mashed (for example http%3A%2F%2Fgallery.invalid%2Fphotos%2Fmicrothumb %2FCandle_close_up_%232_full.jpg )
David
Pekka
4th of October 2006 (Wed), 16:46
Oh, right :)
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.