Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32094 Bump vcpkg versions for 9.8.x #18783

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ set(VCPKG_INSTALL_OPTIONS "--x-abi-tools-use-exact-versions;--downloads-root=${V
set(VCPKG_VERBOSE OFF)

if(WIN32)
set(VCPKG_HOST_TRIPLET "x64-windows" CACHE STRING "host triplet")
set(VCPKG_TARGET_TRIPLET "x64-windows" CACHE STRING "target triplet")
elseif(APPLE)
set(VCPKG_HOST_TRIPLET "x64-osx" CACHE STRING "host triplet")
set(VCPKG_TARGET_TRIPLET "x64-osx" CACHE STRING "target triplet")
elseif(UNIX)
set(VCPKG_HOST_TRIPLET "x64-linux-dynamic" CACHE STRING "host triplet")
set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet")
endif()

Expand Down
12 changes: 8 additions & 4 deletions configuration/configmgr/configmgrlib/XSDComponentParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ void XSDComponentParser::parseXSD(const pt::ptree &compTree)
{
bool foundComponentDef = false;

pt::ptree tree = compTree.get_child("", pt::ptree());
pt::ptree treeDefault;
pt::ptree tree = compTree.get_child("", treeDefault);

//
// First time through look for attributeGroups that can be defined and for existence of a sequence element that actually defines the component
Expand All @@ -49,7 +50,8 @@ void XSDComponentParser::parseXSD(const pt::ptree &compTree)

if (foundComponentDef)
{
pt::ptree elemTree = tree.get_child("xs:sequence.xs:element", pt::ptree());
pt::ptree elemTreeDefault;
pt::ptree elemTree = tree.get_child("xs:sequence.xs:element", elemTreeDefault);
if (!elemTree.empty())
{
std::string elementName = getXSDAttributeValue(elemTree, "<xmlattr>.name");
Expand All @@ -72,7 +74,8 @@ void XSDComponentParser::parseXSD(const pt::ptree &compTree)

//
// Parse any attributes, these are located in the xs:complexType section
pt::ptree attributeTree = elemTree.get_child("xs:complexType", pt::ptree());
pt::ptree attributeTreeDefault;
pt::ptree attributeTree = elemTree.get_child("xs:complexType", attributeTreeDefault);
for (auto attrIt = attributeTree.begin(); attrIt != attributeTree.end(); ++attrIt)
{
//
Expand All @@ -90,7 +93,8 @@ void XSDComponentParser::parseXSD(const pt::ptree &compTree)

//
// Now parse the sequence section (these are sub keys for the component)
XSDSchemaParser::parseXSD(elemTree.get_child("xs:complexType.xs:sequence", pt::ptree()));
pt::ptree seqDefault;
XSDSchemaParser::parseXSD(elemTree.get_child("xs:complexType.xs:sequence", seqDefault));

//
// If there were other keys that we needed to support, this is where a loop would be added
Expand Down
18 changes: 12 additions & 6 deletions configuration/configmgr/configmgrlib/XSDSchemaParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ void XSDSchemaParser::parseXSD(const pt::ptree &keys)
}
else if (elemType == "xs:sequence")
{
parseXSD(it->second.get_child("", pt::ptree()));
pt::ptree emptyTree;
parseXSD(it->second.get_child("", emptyTree));
}
else if (elemType == "xs:element")
{
Expand Down Expand Up @@ -233,7 +234,8 @@ void XSDSchemaParser::parseAttributeGroup(const pt::ptree &attributeTree)
std::shared_ptr<XSDValueSetParser> pXSDValueSetParaser = std::make_shared<XSDValueSetParser>(pValueSet);
std::string groupByName = getXSDAttributeValue(attributeTree, "<xmlattr>.hpcc:groupByName", false, "");
pXSDValueSetParaser->setGroupByName(groupByName);
pXSDValueSetParaser->parseXSD(attributeTree.get_child("", pt::ptree()));
pt::ptree emptyTree;
pXSDValueSetParaser->parseXSD(attributeTree.get_child("", emptyTree));
m_pSchemaItem->addSchemaType(pValueSet, groupName);
m_pSchemaItem->setProperty("attribute_group_default_overrides", getXSDAttributeValue(attributeTree, "<xmlattr>.hpcc:presetValue", false, ""));
}
Expand Down Expand Up @@ -300,7 +302,8 @@ void XSDSchemaParser::parseComplexType(const pt::ptree &typeTree)
std::shared_ptr<SchemaItem> pComplexType = std::make_shared<SchemaItem>(complexTypeName, "component", m_pSchemaItem);
pComplexType->setProperty("itemType", complexTypeName);

pt::ptree childTree = typeTree.get_child("", pt::ptree());
pt::ptree childTreeDefault;
pt::ptree childTree = typeTree.get_child("", childTreeDefault);
if (!childTree.empty())
{
std::shared_ptr<XSDSchemaParser> pXSDParaser = std::make_shared<XSDSchemaParser>(pComplexType);
Expand All @@ -317,7 +320,8 @@ void XSDSchemaParser::parseComplexType(const pt::ptree &typeTree)
// Just a complexType delimiter, ignore and parse the children
else
{
parseXSD(typeTree.get_child("", pt::ptree()));
pt::ptree emptyTree;
parseXSD(typeTree.get_child("", emptyTree));
}
}

Expand Down Expand Up @@ -709,7 +713,8 @@ std::shared_ptr<SchemaType> XSDSchemaParser::getType(const pt::ptree &typeTree,

if (!restriction->second.empty())
{
pt::ptree restrictTree = restriction->second.get_child("", pt::ptree());
pt::ptree restrictTreeDefault;
pt::ptree restrictTree = restriction->second.get_child("", restrictTreeDefault);
if (std::dynamic_pointer_cast<SchemaTypeIntegerLimits>(pLimits) != nullptr)
{
std::shared_ptr<SchemaTypeIntegerLimits> pBaseIntLimits = std::dynamic_pointer_cast<SchemaTypeIntegerLimits>(pLimits);
Expand Down Expand Up @@ -905,7 +910,8 @@ std::shared_ptr<SchemaValue> XSDSchemaParser::getSchemaValue(const pt::ptree &at
}
else
{
std::shared_ptr<SchemaType> pType = getType(attr.get_child("xs:simpleType", pt::ptree()), false);
pt::ptree simpleTypeDefault;
std::shared_ptr<SchemaType> pType = getType(attr.get_child("xs:simpleType", simpleTypeDefault), false);
if (!pType->isValid())
{
throw(ParseException("Attribute " + m_pSchemaItem->getProperty("name") + "[@" + attrName + "] does not have a valid type"));
Expand Down
32 changes: 16 additions & 16 deletions system/security/plugins/jwtSecurity/jwtSecurity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class CJwtSecurityManager : implements IDaliLdapConnection, public CBaseSecurity
userInfo->setExpirationTime(std::chrono::system_clock::to_time_t(decodedToken.get_expires_at()));
userInfo->setRefreshToken(refreshToken);
userInfo->setJWTToken(token);
for (auto& e : decodedToken.get_payload_claims())
for (auto& e : decodedToken.get_payload_json())
{
std::string key(e.first);

Expand All @@ -398,50 +398,50 @@ class CJwtSecurityManager : implements IDaliLdapConnection, public CBaseSecurity
if (isPrefixString("AllowWorkunitScope", key) || isPrefixString("DenyWorkunitScope", key))
{
// Collect permissions for later batch processing
if (e.second.get_type() == jwt::json::type::string)
if (e.second.is<std::string>())
{
wuScopePerms.push_back(ScopePermission(key, e.second.as_string()));
wuScopePerms.push_back(ScopePermission(key, e.second.get<std::string>()));
}
else
{
jwt::claim::set_t valueSet = e.second.as_set();
auto valueSet = e.second.get<picojson::array>();

for (jwt::claim::set_t::const_iterator x = valueSet.begin(); x != valueSet.end(); x++)
for (auto x = valueSet.begin(); x != valueSet.end(); x++)
{
wuScopePerms.push_back(ScopePermission(key, *x));
wuScopePerms.push_back(ScopePermission(key, x->get<std::string>()));
}
}
}
else if (isPrefixString("AllowFileScope", key) || isPrefixString("DenyFileScope", key))
{
// Collect permissions for later batch processing
if (e.second.get_type() == jwt::json::type::string)
if (e.second.is<std::string>())
{
fileScopePerms.push_back(ScopePermission(key, e.second.as_string()));
fileScopePerms.push_back(ScopePermission(key, e.second.get<std::string>()));
}
else
{
jwt::claim::set_t valueSet = e.second.as_set();
auto valueSet = e.second.get<picojson::array>();

for (jwt::claim::set_t::const_iterator x = valueSet.begin(); x != valueSet.end(); x++)
for (auto x = valueSet.begin(); x != valueSet.end(); x++)
{
fileScopePerms.push_back(ScopePermission(key, *x));
fileScopePerms.push_back(ScopePermission(key, x->get<std::string>()));
}
}
}
else if (e.second.get_type() == jwt::json::type::string)
else if (e.second.is<std::string>())
{
// Feature permission where value is a single string
userInfo->mergeFeaturePerm(key, e.second.as_string());
userInfo->mergeFeaturePerm(key, e.second.get<std::string>());
}
else
{
// Feature permission where value is an array of strings
jwt::claim::set_t valueSet = e.second.as_set();
auto valueSet = e.second.get<picojson::array>();

for (jwt::claim::set_t::const_iterator x = valueSet.begin(); x != valueSet.end(); x++)
for (auto x = valueSet.begin(); x != valueSet.end(); x++)
{
userInfo->mergeFeaturePerm(key, *x);
userInfo->mergeFeaturePerm(key, x->get<std::string>());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 3690 files
2 changes: 1 addition & 1 deletion vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "fba75d09065fcc76a25dcf386b1d00d33f5175af"
"baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625"
},
"registries": [],
"overlay-ports": [
Expand Down
Loading
Loading