]> granicus.if.org Git - icinga2/commitdiff
Change decode - check order in path decoding
authorJean-Marcel Flach <jean-marcel.flach@netways.de>
Wed, 15 Jul 2015 13:28:26 +0000 (15:28 +0200)
committerJean-Marcel Flach <jean-marcel.flach@netways.de>
Wed, 15 Jul 2015 13:36:17 +0000 (15:36 +0200)
refs #9470

lib/base/url.cpp

index c456d36dee7d03d39e09c9a5b8d3525a0368f641..c491dd35a682f173f05ab429604fc038ef6be8b0 100644 (file)
@@ -215,11 +215,11 @@ bool Url::ParsePath(const String& path)
                if (token.IsEmpty())
                        continue;
 
-               String decodedToken = Utility::UnescapeString(token);
-
-               if (!ValidateToken(decodedToken, ACPATHSEGMENT))
+               if (!ValidateToken(token, ACPATHSEGMENT))
                        return false;
 
+               String decodedToken = Utility::UnescapeString(token);
+
                m_Path.push_back(decodedToken);
        }