summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-27 09:18:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-27 09:18:11 +0200
commit653e0ccc4e6230f28dd4c553dc7e9482beafa3cd (patch)
treee1063dcc839466afd4da3a1d7c42341a712c187c
parent6d6668bb22a063cabb86bc601603d205522ae865 (diff)
tdf#101898: Only re-substitute whole segments with $(username)
...otherwise, if $(username) happens to be "user", it will endlessly re- substitute inside a (already partly re-substituted) URL of the form $(user)/... Regression introduced with 16fb0d3d0f68708c183c53bd18660a23970b77fe "tdf#98407 PathSubstitution: Add substitution for $(username)". Change-Id: I1c8b64f383fdfd97fa5edc192e9ca4b46944d6f1
-rw-r--r--framework/source/services/substitutepathvars.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 5130ae39a8e9..de2b9caef801 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1096,7 +1096,8 @@ throw ( RuntimeException )
if ( nPos >= 0 )
{
bool bMatch = true;
- if ( i->eVariable == PREDEFVAR_LANGID ||
+ if ( i->eVariable == PREDEFVAR_USERNAME ||
+ i->eVariable == PREDEFVAR_LANGID ||
i->eVariable == PREDEFVAR_VLANG )
{
// Special path variables as they can occur in the middle of a path. Only match if they