Mercurial > hg > orthanc
diff Core/Toolbox.cpp @ 207:7f74209ea0f8
RestApi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Nov 2012 16:23:11 +0100 |
parents | 8e673a65564d |
children | c9b3ba0fd140 |
line wrap: on
line diff
--- a/Core/Toolbox.cpp Wed Nov 28 12:03:18 2012 +0100 +++ b/Core/Toolbox.cpp Wed Nov 28 16:23:11 2012 +0100 @@ -288,6 +288,15 @@ { components.push_back(std::string(&uri[start], end - start)); } + + for (size_t i = 0; i < components.size(); i++) + { + if (components[i].size() == 0) + { + // Empty component, as in: "/coucou//e" + throw OrthancException(ErrorCode_UriSyntax); + } + } }