• 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.

Item6648: Hostname listed twice

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

aApple posted this on #twiki IRC today 2011-02-10:

xApple has joined #twiki    [15:12]
xApple:   Hello everyone
I have been searching the support and google, but can't find a solution to my strange error
I would like to use Apache Authentication and got that working
In the htaccess file I protect the "/twiki/bin/viewauth" file
The problem is the user never gets redirected to that page
Instead twiki tries to redirect to: http://domain.name.chhttp://domain.name.ch/twiki/bin/viewauth
It then complains that host is not in the PermittedRedirectHostUrls
How is it possible I get such a string where the hostname appears twice ?
I am running the latest version of Twiki    [15:12]
xApple:   I believe it's a bug in twiki
I tracked it down to ApacheLogin.pm line 95
$hostname is added to $url
but $url already has a hostname !
thus ending up with http://domain.name.chhttp://domain.name.ch/twiki/bin/viewauth    [16:26]
xApple has quit IRC (Read error: Operation timed out)    [17:01]

-- TWiki:Main/PeterThoeny - 2011-02-10

Same issue reported by TWiki:Main.DmitryBelozerov in TWiki:Support/SID-01540.

-- TWiki:Main/PeterThoeny - 2012-09-23

TWiki:Main.DmitryBelozerov wrote in TWiki:Support.SID-01540 on 2012-10-04:

I've checked configuration files on production TWiki instance and found incorrect {DefaultUrlHost} it was without http:// as well as for {PermitedURL}.

Looks like error solved at this moment. Probably documentation should be updated with important note related to URL format. Also seems like for hosts with alias (for compatibility after twiki migration) {PermitedURL} must be formed correctly (full qualified name with http://, etc).

I am closing this with no action required.

I tweaked the configure docs:

# **URL M**
# This is the root of all TWiki URLs, e.g. http://myhost.com:123. It must
# contain the protocol (http:// or https://) and domain name or IP address.
# Add port number if needed. Do not add a trailing slash.
# $TWiki::cfg{DefaultUrlHost} = 'http://your.domain.com';

# **STRING**
# If your host has aliases (such as both www.twiki.org and twiki.org, and some IP addresses)
# you need to list them to tell TWiki that redirecting to them is OK. TWiki uses redirection
# as part of its normal mode of operation when it changes between editing and viewing.
# The security setting {AllowRedirectUrl} is per default disabled making redirecting to other
# domains restricted to prevent TWiki from being used in phishing attacks to protect it from
# middleman exploits. You can add additional URLs to this setting to enable redirects to
# additional trusted sites. Enter comma-space separated list of URLs. Each URL must be of
# form http://your.domain.com, e.g. it must contain the protocol (http:// or https://) and
# domain name or IP address. Add port number if needed. Do not add a trailing slash.
$TWiki::cfg{PermittedRedirectHostUrls} = '';

-- TWiki:Main/PeterThoeny - 2012-09-23

ItemTemplate
Summary Hostname listed twice
ReportedBy TWiki:Main.PeterThoeny
Codebase ~twiki4, 5.0.1
SVN Range TWiki-5.0.1, Tue, 11 Jan 2011, build 20174
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-10-06 - PeterThoeny
 
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