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