6 |
$back ||= $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} && $BACK_REFERER; |
$back ||= $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} && $BACK_REFERER; |
7 |
$back = uri_unescape($back) if $back && $back =~ m/^https?%3A%2F%2F/i; |
$back = uri_unescape($back) if $back && $back =~ m/^https?%3A%2F%2F/i; |
8 |
-$back =~ s/^http:/https:/ if $server_name ne 'localhost'; |
-$back =~ s/^http:/https:/ if $server_name ne 'localhost'; |
9 |
+$back =~ s/^http:/https:/ if $server_name ne 'localhost' && defined($back; |
+$back =~ s/^http:/https:/ if $server_name ne 'localhost' && defined($back); |
10 |
#warn "back is $back\n"; |
#warn "back is $back\n"; |
11 |
if ($back && $back =~ m!^/!) { |
if ($back && $back =~ m!^/!) { |
12 |
my $hostname = $server_name; |
my $hostname = $server_name; |