If one specifies
$conf['picture_url_style'] = 'id-file';
in their configuration file, navigation is broken on some pictures, clicking on the image link in the category leads to "Bad Request".
This seems to happen only when the file name contains a certain combination of hyphens and spaces.
Steps to reproduce: Set $conf['picture_url_style'] = 'id-file';
Upload a file named "Killer Whale Type B - sort of.jpg" or "Cretin des bois test - pour rire.jpg"
**Reported by kubrick on 22 Aug 2012 22:57**
**Version:** 2.4.3
If one specifies
$conf['picture_url_style'] = 'id-file';
in their configuration file, navigation is broken on some pictures, clicking on the image link in the category leads to "Bad Request".
This seems to happen only when the file name contains a certain combination of hyphens and spaces.
**Steps to reproduce:** Set $conf['picture_url_style'] = 'id-file';
Upload a file named "Killer Whale Type B - sort of.jpg" or "Cretin des bois test - pour rire.jpg"
Example of (mal)formed URL :
http://album.fgv6.net/picture.php?/34-Killer%20Whale%20Type%20B%20-%20sort%20of/category/4-on_the_rrs_ernest_shackleton
**Additional information:** Re-uploading the file on a different name fixes the problem.
[Piwigo Bugtracker #2729](http://piwigo.org/bugs/view.php?id=2729)
<!-- github-sync-id:97226442 -->
Adding
parse_str($_SERVER['QUERY_STRING'], $_GET);
at the top of include/common.inc.php fixes the problem.
Something must be tampering with the $_GET variable before it arrives there because in the problematic cases $_GET is empty.
**Comment posted by kubrick on 26 Aug 2012 19:41**
Adding
parse_str($_SERVER['QUERY_STRING'], $_GET);
at the top of include/common.inc.php fixes the problem.
Something must be tampering with the $_GET variable before it arrives there because in the problematic cases $_GET is empty.
<!-- github-comment-id:124892744 -->
sorry, I cannot reproduce (tried Killer Whale Type B - sort of with your url style and it works on my server)
**Comment posted by rvelices on 27 Aug 2012 18:46**
sorry, I cannot reproduce (tried Killer Whale Type B - sort of with your url style and it works on my server)
<!-- github-comment-id:124892759 -->
Ok, that's very odd. I made a fresh install on MAMP, and I can't reproduce either.
On my server, where the problem occurs, it's even odder:
If I create a new file in piwigo's directory, let's say test.php and just have it to print_r($_GET), when I call /test.php?/1-Killer Whale Type B - sort of/category/1-test
I get:
Now, it I do the same at the very top of picture.php, I get:
<!--Array
(
)
-->
Why??? Any ideas?
**Comment posted by kubrick on 28 Aug 2012 10:46**
Ok, that's very odd. I made a fresh install on MAMP, and I can't reproduce either.
On my server, where the problem occurs, it's even odder:
If I create a new file in piwigo's directory, let's say test.php and just have it to print_r($_GET), when I call /test.php?/1-Killer Whale Type B - sort of/category/1-test
I get:
Array ( [/1-Killer_Whale_Type_B_-_sort_of/category/1-test] => )
Normal.
Now, it I do the same at the very top of picture.php, I get:
<!--Array
(
)
-->
Why??? Any ideas?
<!-- github-comment-id:124892771 -->
FYI I'm still having this bug, and I still need the parse_str work around with the latest version of piwigo...
**Comment posted by kubrick on 10 Jan 2014 12:21**
FYI I'm still having this bug, and I still need the parse_str work around with the latest version of piwigo...
<!-- github-comment-id:124892780 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by kubrick on 22 Aug 2012 22:57
Version: 2.4.3
If one specifies
$conf['picture_url_style'] = 'id-file';
in their configuration file, navigation is broken on some pictures, clicking on the image link in the category leads to "Bad Request".
This seems to happen only when the file name contains a certain combination of hyphens and spaces.
Steps to reproduce: Set $conf['picture_url_style'] = 'id-file';
Upload a file named "Killer Whale Type B - sort of.jpg" or "Cretin des bois test - pour rire.jpg"
Example of (mal)formed URL :
http://album.fgv6.net/picture.php?/34-Killer%20Whale%20Type%20B%20-%20sort%20of/category/4-on_the_rrs_ernest_shackleton
Additional information: Re-uploading the file on a different name fixes the problem.
Piwigo Bugtracker #2729
Comment posted by kubrick on 26 Aug 2012 19:41
Adding
parse_str($_SERVER['QUERY_STRING'], $_GET);
at the top of include/common.inc.php fixes the problem.
Something must be tampering with the $_GET variable before it arrives there because in the problematic cases $_GET is empty.
Comment posted by rvelices on 27 Aug 2012 18:46
sorry, I cannot reproduce (tried Killer Whale Type B - sort of with your url style and it works on my server)
Comment posted by kubrick on 28 Aug 2012 10:46
Ok, that's very odd. I made a fresh install on MAMP, and I can't reproduce either.
On my server, where the problem occurs, it's even odder:
If I create a new file in piwigo's directory, let's say test.php and just have it to print_r($_GET), when I call /test.php?/1-Killer Whale Type B - sort of/category/1-test
I get:
Array ( [/1-Killer_Whale_Type_B_-_sort_of/category/1-test] => )
Normal.
Now, it I do the same at the very top of picture.php, I get:
<!--Array
(
)
-->
Why??? Any ideas?
Comment posted by kubrick on 10 Jan 2014 12:21
FYI I'm still having this bug, and I still need the parse_str work around with the latest version of piwigo...
Comment posted by kubrick on 20 Nov 2014 07:57
Still happening in 2.7.1