I have redirected gallery.my.domain to my.domain/zenphoto/. Everything works fine. But if you want to access a password protected album you get these warnings after you have entered the (right) password:
Warning: strpos() [function.strpos]: Empty delimiter in .../html/zenphoto/zp-core/functions.php on line 1598
Warning: Cannot modify header information - headers already sent by (output started at .../html/zenphoto/zp-core/functions.php:1598) in .../html/zenphoto/zp-core/functions.php on line 1697
If you press the browsers back button now, the gallery is shown. Is there a setting I can do to get rid of these warnings?
Thanks,
Michael
Comments
You might want to install the support release. Your error line number does not correspond to any line in that release, which is all I have access to while I am traveling, so I cannot speculate on its cause.
Here are the according 1.4.4 code snippets:
function sanitizeRedirect($redirectTo, $forceHost=false) {
$redirect = NULL;
if ($redirectTo && $redir = parse_url($redirectTo)) {
if (isset($redir['scheme']) && isset($redir['host'])) {
$redirect .= $redir['scheme'].'://'.sanitize($redir['host']);
} else {
if ($forceHost) {
$redirect .= SERVER_PROTOCOL.'://'.$_SERVER['HTTP_HOST'];
if(strpos($redirectTo, WEBPATH) === false) {
$redirect .= WEBPATH;
}
function zp_handle_password($authType=NULL, $check_auth=NULL, $check_user=NULL) {
...
$success = zp_apply_filter('guest_login_attempt', $success, $post_user, $post_pass, $authType);;
if ($success) {
// Correct auth info. Set the cookie.
if (DEBUG_LOGIN) debugLog("zp_handle_password: valid credentials");
zp_setCookie($authType, $auth);
if (isset($_POST['redirect'])) {
$redirect_to = sanitizeRedirect($_POST['redirect'], true);
if (!empty($redirect_to)) {
header("Location: " . $redirect_to);
exitZP();
}
}
Thanks for your investigation,
Michael