• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

viewauth Redirect May Add Superfluous Slash

For read-authenticated topics, a redirect from view to viewauth happens.

With the 4.1.2 distribution, when one

then the redirect adds a superfluous / after viewauth. I.e., the URL has two slashes after redirection.

While this works, it is a nuisance as it causes inter-topic links to reload the page, since the base href in the page is without the double slash and thus different to the page's URL.

Example

Setup a TWiki that doesn't use the /view prefix to show URLs. Use ApacheLogin authentication.

Set ALLOWTOPICVIEW for one topic (say, Test.TestPage).

Access that page with a user that is listed in the topic ACL. That user must not have logged in before in that session (otherwise the CGI session may supply the user credentials). The user uses the URL http://wiki.example.tld/Test/TestPage.

After authentication, the URL gets rewritten to http://wiki.example.tld/viewauth//Test/TestPage. (Please note the double slash.)

Root Cause Analysis and Patch

The root cause is in Client::ApacheLogin on line 94, where PATH_INFO is appended with an intermitting slash. But PATH_INFO starts already with a slash, that additional slash is not needed.

That else-clause is only used if /view is not in the request URI, i.e., when one uses shortened URLs. Therefore the bug is not visible in standard TWiki setups.

I attach a patch to the 4.1.2 distribution that fixes the problem.

-- TWiki:Main.JoachimSchrod - 27 Apr 2007


Fixed in MAIN

CC

Comments

ItemTemplate
Summary viewauth Redirect May Add Superfluous Slash
ReportedBy TWiki:Main.JoachimSchrod
Codebase 4.1.2
SVN Range

AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:14127
TargetRelease minor
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-01-22 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback