input parameter "redirect_decoded" is not valid #657

Closed
opened 2026-10-05 00:09:36 +02:00 by adam · 3 comments
Owner

With Piwigo 2.9.1, if you have have set a $conf['gallery_url'] then the redirect path check will always fail.

$_POST[redirect_decoded] = /demo/admin.php
get_gallery_home_url() = http://fr.piwigo.org/demo

Piwigo encountered an irrecoverable error

[Hacking attempt] the input parameter "redirect_decoded" is not valid

#1 check_input_parameter identification.php(52)

With Piwigo 2.9.1, if you have have set a `$conf['gallery_url']` then the redirect path check will always fail. ``` $_POST[redirect_decoded] = /demo/admin.php get_gallery_home_url() = http://fr.piwigo.org/demo ``` > Piwigo encountered an irrecoverable error > > [Hacking attempt] the input parameter "redirect_decoded" is not valid > > #1 check_input_parameter identification.php(52) <!-- github-sync-id:236304407 -->
adam closed this issue 2026-10-05 00:09:36 +02:00
Author
Owner

Hi, Thanks for the fix. It allowed me to log in again.

Bogdan

Hi, Thanks for the fix. It allowed me to log in again. Bogdan <!-- github-comment-id:310903824 -->
Author
Owner

Thanks for the fix!
Nacho

Thanks for the fix! Nacho <!-- github-comment-id:321028032 -->
Author
Owner

I notice this problem when running a second test site under a subfolder. When I sign into the subdirectory site I receive this error -- and indentification.php has the "fix" suggested here. If I comment out this line and try signing into the second site I can get around this error, but get redirected to the original website located outside the subdirectory. I can still manually get back to the test site by referencing it in the url address and be signed in after that point.

//check_input_parameter('redirect_decoded', $_POST, false, '{^'.preg_quote(cookie_path()).'}');

I notice this problem when running a second test site under a subfolder. When I sign into the subdirectory site I receive this error -- and indentification.php has the "fix" suggested here. If I comment out this line and try signing into the second site I can get around this error, but get redirected to the original website located outside the subdirectory. I can still manually get back to the test site by referencing it in the url address and be signed in after that point. `//check_input_parameter('redirect_decoded', $_POST, false, '{^'.preg_quote(cookie_path()).'}');` <!-- github-comment-id:1843361400 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#657