From 653e0ccc4e6230f28dd4c553dc7e9482beafa3cd Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Sep 2016 09:18:11 +0200 Subject: 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 --- framework/source/services/substitutepathvars.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit