Skip to content

Commit

Permalink
Lets sneak this in
Browse files Browse the repository at this point in the history
Fix for broken redirects when using host:port method to connect to
rehash.
  • Loading branch information
paulej72 committed Jun 21, 2016
1 parent cec3776 commit c7fcc89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion themes/default/htdocs/article.pl
Expand Up @@ -161,7 +161,13 @@ sub main {
}

my $return_url ="";
$return_url = "//".$ENV{HTTP_HOST}.$ENV{REQUEST_URI} unless $form->{cchp};
my $redirect = '';
$redirect = $redirect."&threshold=".$form->{threshold} if defined($form->{threshold});
$redirect = $redirect."&highlightthresh=".$form->{highlightthresh} if defined($form->{highlightthresh});
$redirect = $redirect."&commentsort=".$form->{commentsort} if defined($form->{commentsort});
$redirect = $redirect."&mode=".$form->{mode} if ($form->{mode});
$redirect = $redirect."&noupdate=1";
$return_url = $gSkin->{rootdir} . "/article.pl?sid=" . $sid . $redirect unless $form->{cchp};

slashDisplay('display', {
poll => $pollbooth,
Expand Down
2 changes: 1 addition & 1 deletion themes/default/htdocs/index.pl
Expand Up @@ -304,7 +304,7 @@ sub main {
my $metamod_reader = getObject('Slash::Metamod', { db_type => 'reader' });
$metamod_elig = $metamod_reader->metamodEligible($user);
}
my $return_url = "//".$ENV{HTTP_HOST}.$ENV{REQUEST_URI};
my $return_url = $gSkin->{rootdir};

slashDisplay('index', {
metamod_elig => $metamod_elig,
Expand Down
2 changes: 1 addition & 1 deletion themes/default/templates/userlogin;misc;default
Expand Up @@ -15,7 +15,7 @@ userlogin
__template__

[%# we log in via main ("real") rootdir, return to current rootdir %]
[% IF !return_url; return_url = gSkin.rootdir _ '/'; END %]
[% IF !return_url; return_url = gSkin.rootdir; END %]
<form action="[% constants.real_rootdir %]/login.pl" method="post">
<fieldset>
<legend>Log In</legend>
Expand Down

0 comments on commit c7fcc89

Please sign in to comment.