Tags:
create new tag
view all tags

SID-01846: RedirectPlugin loops infinitely when using the Jump Box

Status: Answered Answered TWiki version: 5.0.2 Perl version: 5.8.8
Category: RedirectPlugin Server OS: Red Hat Linux Last update: 10 years ago

When using the Jump Box to jump to a redirecting topic the browser is directed back to the redirecting topic repeatedly.

If I have this: IRedirectToSomeWhere

%REDIRECT{"SomeWhere"}% 

And I use the Jump Box from any topic to IRedirectToSomeWhere I would expect to get the topic SomeWhere, instead, the browser is redirected to IRedirectToSomeWhere with an additional redirectedfrom URL parameter.

-- Joshua Tharp - 2013-12-31

Discussion and Answer

Looking at the RedirectPluginDev topic I found the pointer to removing the Jump Box's topic parameter. This fixes the problem.

Original code (version: 26175, lines: 132-133):

my $q = "?redirectedfrom=$baseWeb.$baseTopic";
$q .= ";" . $queryString if $queryString;

Sidenote: shouldn't the semi-colon be an ampersand?

I'm only a Perl hack, so this is probably far from optimal, but I changed it this way:

my $q = "?redirectedfrom=$baseWeb.$baseTopic";
if ($queryString) {
  $queryString =~ s/topic=[a-zA-Z_0-9]+//;
  $q .= ";" . $queryString if $queryString;
}

-- Joshua Tharp - 2013-12-31

This problem was noticed when implementing the fix for SID-01848.

-- Joshua Tharp - 2013-12-31

Thank you Joshua! I finally updated the RedirectPlugin with your fix.

-- Peter Thoeny - 2015-12-03

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title RedirectPlugin loops infinitely when using the Jump Box
SupportCategory RedirectPlugin
TWiki version 5.0.2
Server OS Red Hat Linux
Web server

Perl version 5.8.8
Browser & version

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2015-12-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.