Skip to content

Commit

Permalink
Item10064: Recover redirectto param from CGIQuery
Browse files Browse the repository at this point in the history
Also added a minor formatting change to the error message.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@11009 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Mar 12, 2011
1 parent 2ddcf81 commit 05cdcd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/lib/Foswiki.pm
Expand Up @@ -1152,7 +1152,7 @@ sub redirect {
param1 => 'redirect',
param2 => 'unsafe redirect to '
. $url
. ': host does not match {DefaultUrlHost} , and is not in {PermittedRedirectHostUrls}"'
. ': host does not match {DefaultUrlHost} , and is not in {PermittedRedirectHostUrls} "'
. $Foswiki::cfg{DefaultUrlHost} . '"'
);
}
Expand Down
10 changes: 5 additions & 5 deletions core/lib/Foswiki/UI/Rename.pm
Expand Up @@ -51,10 +51,11 @@ parameters:
sub rename {
my $session = shift;

my $oldWeb = $session->{webName};
my $oldTopic = $session->{topicName};
my $query = $session->{request};
my $action = $session->{cgiQuery}->param('action') || '';
my $oldWeb = $session->{webName};
my $oldTopic = $session->{topicName};
my $query = $session->{request};
my $action = $session->{cgiQuery}->param('action') || '';
my $redirectto_param = $session->{cgiQuery}->param('redirectto') || '';

Foswiki::UI::checkWebExists( $session, $oldWeb, 'rename' );

Expand All @@ -66,7 +67,6 @@ sub rename {
$new_url = _renameTopicOrAttachment( $session, $oldWeb, $oldTopic );
}

my $redirectto_param = $query->{'param'}->{'redirectto'} || '';
if ( $redirectto_param ne '' ) {
$new_url = $session->redirectto($redirectto_param);
}
Expand Down

0 comments on commit 05cdcd5

Please sign in to comment.