SID-01540: WebNotify duplicated URL's inside links in Email's
| Status: |
Answered |
TWiki version: |
|
Perl version: |
5.8.5 |
| Category: |
CategoryEmail |
Server OS: |
RHEL5 kernel 2.6.18 |
Last update: |
13 years ago |
I have TWiki 5.1.1 installed under RHEL5 64bit.
I got incorrect links inside notification letter:
link names displayed correctly, but link contents duplicated URL like :
url1.com/url1.com/bin/view/Web/Document
I've checked ./lib/LocalSite.cfg file as discribed in one of the discussions and find no issue with {DefaultUrlHost} it contains only server URL.
Could you please help me what's wrong and how i could fix this issue.
I'm using apache 2.2 with
VirtualHost enabled for TWiki site.
Thank you
--
DmitryBelozerov - 2012-09-21
Discussion and Answer
This seems to be a known open bug:
TWikibug:Item6648
- Hostname listed twice
It helps debug if you can describe enough details so that we can reproduce the issue. Such as your LocalSite.cfg.
Not sure if related:
TWikibug:Item6865
- Redirect to viewauth shows domain name twice (Apache login)
--
PeterThoeny - 2012-09-23
$TWiki::cfg{DefaultUrlHost} = 'http://starcraft.ea.com';
$TWiki::cfg{PermittedRedirectHostUrls} = 'http://starcraft.am.com';
$TWiki::cfg{ScriptUrlPath} = '/bin';
$TWiki::cfg{PubUrlPath} = '/pub';
$TWiki::cfg{PubDir} = '/var/www/starcraft2/twiki2/pub';
$TWiki::cfg{TemplateDir} = '/var/www/starcraft2/twiki2/templates';
$TWiki::cfg{DataDir} = '/var/www/starcraft2/twiki2/data';
$TWiki::cfg{LocalesDir} = '/var/www/starcraft2/twiki2/locale';
$TWiki::cfg{WorkingDir} = '/var/www/starcraft2/twiki2/working';
$TWiki::cfg{ScriptSuffix} = '';
$TWiki::cfg{Password} = '##########';
$TWiki::cfg{SafeEnvPath} = '/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/oracle/10.2.0.5/client64//bin';
$TWiki::cfg{UseClientSessions} = 1;
$TWiki::cfg{Sessions}{ExpireAfter} = 21600;
$TWiki::cfg{Sessions}{ExpireCookiesAfter} = 0;
$TWiki::cfg{Sessions}{IDsInURLs} = 0;
$TWiki::cfg{Sessions}{UseIPMatching} = 1;
$TWiki::cfg{Sessions}{MapIP2SID} = 0;
$TWiki::cfg{LoginManager} = 'TWiki::LoginManager::TemplateLogin';
$TWiki::cfg{TemplateLogin}{PreventBrowserRememberingPassword} = 0;
$TWiki::cfg{LoginNameFilterIn} = '^[^\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]+$';
$TWiki::cfg{DefaultUserLogin} = 'guest';
$TWiki::cfg{DefaultUserWikiName} = 'TWikiGuest';
$TWiki::cfg{AdminUserLogin} = 'admin';
$TWiki::cfg{AdminUserWikiName} = 'TWikiAdminUser';
$TWiki::cfg{SuperAdminGroup} = 'TWikiAdminGroup';
$TWiki::cfg{UsersTopicName} = 'TWikiUsers';
$TWiki::cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth,rest';
$TWiki::cfg{AuthRealm} = 'Enter your TWiki.LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. !JohnSmith, unless you chose otherwise). Visit TWiki.TWikiRegistration if you do not have one.';
$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$TWiki::cfg{Register}{EnableNewUserRegistration} = 1;
$TWiki::cfg{Register}{HidePasswd} = 1;
$TWiki::cfg{Register}{AllowSystemGeneratedPassword} = 1;
$TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';
$TWiki::cfg{MinPasswordLength} = 1;
$TWiki::cfg{MustChangePasswordAfterReset} = 1;
$TWiki::cfg{Htpasswd}{FileName} = '/var/www/starcraft2/twiki2/data/.htpasswd';
$TWiki::cfg{Htpasswd}{Encoding} = 'crypt';
$TWiki::cfg{CryptToken}{Enable} = 0;
$TWiki::cfg{CryptToken}{SecureActions} = 'register,save,comment,createweb,upload';
$TWiki::cfg{OS} = 'UNIX';
$TWiki::cfg{DetailedOS} = 'linux';
$TWiki::cfg{DenyDotDotInclude} = 1;
$TWiki::cfg{AllowInlineScript} = 1;
$TWiki::cfg{UploadFilter} = '^(\\.htaccess|.*\\.(?i)(?:php[0-9s]?(\\..*)?|[sp]htm[l]?(\\..*)?|pl|py|cgi))$';
$TWiki::cfg{NameFilter} = '[\\s\\*?~^\\$@%`"\'&;|<>\\[\\]\\+\\x00-\\x1f]';
$TWiki::cfg{AccessibleENV} = '^(HTTP_\\w+|REMOTE_\\w+|SERVER_\\w+|REQUEST_\\w+|MOD_PERL|TWIKI_ACTION)$';
$TWiki::cfg{AntiSpam}{EmailPadding} = '';
$TWiki::cfg{AntiSpam}{HideUserDetails} = 1;
$TWiki::cfg{AntiSpam}{RobotsAreWelcome} = 1;
$TWiki::cfg{Log}{view} = 1;
--
DmitryBelozerov - 2012-09-24
If you need some additional details (full config file, etc) please let me know
--
DmitryBelozerov - 2012-09-25
Hmm, I can't spot anything unusual from the configure file.
--
PeterThoeny - 2012-09-25
Could you add debug statements to find out values of
$TWiki::cfg{DefaultUrlHost} and
$TWiki::cfg{ScriptUrlPath} as used in
/var/www/starcraft2/twiki2/lib/TWiki/Contrib/MailerContrib.pm. There are three places. Add this and watch your apache error log:
my $base = $TWiki::cfg{DefaultUrlHost} . $TWiki::cfg{ScriptUrlPath};
print STDERR "====DEBUG: base: $base, {DefaultUrlHost}: " . $TWiki::cfg{DefaultUrlHost} .
", {ScriptUrlPath}: " . $TWiki::cfg{ScriptUrlPath} . "\n";
What TWiki version are you on?
--
PeterThoeny - 2012-09-25
TWiki-5.1.1, Sat, 14 Jan 2012, build 22570
--
DmitryBelozerov - 2012-09-26
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).
Thank you
--
DmitryBelozerov - 2012-10-04
Thanks for reporting back, Dmitry. I am closing
TWikibug:Item6648
.
--
PeterThoeny - 2012-10-06
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} = '';
--
PeterThoeny - 2012-10-06
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.