diff --git a/client/SDL/common/sdl_prefs.cpp b/client/SDL/common/sdl_prefs.cpp index 3c28b9347..6f72b6e17 100644 --- a/client/SDL/common/sdl_prefs.cpp +++ b/client/SDL/common/sdl_prefs.cpp @@ -65,7 +65,7 @@ WINPR_JSON* SdlPref::get_item(const WINPR_JSONPtr& config, const std::string& ke { if (!config) return nullptr; - return WINPR_JSON_GetObjectItem(config.get(), key.c_str()); + return WINPR_JSON_GetObjectItemCaseSensitive(config.get(), key.c_str()); } bool SdlPref::get_bool(const WINPR_JSONPtr& config, const std::string& key, bool fallback) const diff --git a/client/X11/xf_utils.c b/client/X11/xf_utils.c index 32b5d1460..351289d1a 100644 --- a/client/X11/xf_utils.c +++ b/client/X11/xf_utils.c @@ -741,7 +741,7 @@ char* getConfigOption(BOOL system, const char* option) if (!file) return NULL; - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(file, option); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(file, option); if (obj) { const char* val = WINPR_JSON_GetStringValue(obj); diff --git a/client/common/sso_mib_tokens.c b/client/common/sso_mib_tokens.c index 5c9de081a..9a3bf0165 100644 --- a/client/common/sso_mib_tokens.c +++ b/client/common/sso_mib_tokens.c @@ -100,7 +100,7 @@ static BOOL sso_mib_get_rdsaad_access_token(rdpClientContext* client_context, co { goto cleanup; } - WINPR_JSON* prop = WINPR_JSON_GetObjectItem(json, "kid"); + WINPR_JSON* prop = WINPR_JSON_GetObjectItemCaseSensitive(json, "kid"); if (!prop) { goto cleanup; diff --git a/libfreerdp/common/settings.c b/libfreerdp/common/settings.c index 70806fdac..86d7b7a6c 100644 --- a/libfreerdp/common/settings.c +++ b/libfreerdp/common/settings.c @@ -2714,7 +2714,7 @@ static BOOL wchar_from_json(WCHAR* wstr, size_t len, const WINPR_JSON* obj, cons { if (!obj || !WINPR_JSON_IsObject(obj)) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(obj, key); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(obj, key); if (!item || !WINPR_JSON_IsString(item)) return FALSE; @@ -2761,7 +2761,7 @@ static int64_t int_from_json(const WINPR_JSON* obj, const char* key, int64_t min errno = EINVAL; return 0; } - WINPR_JSON* item = WINPR_JSON_GetObjectItem(obj, key); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(obj, key); return int_from_json_item(item, min, max); } @@ -2797,7 +2797,7 @@ static uint64_t uint_from_json(const WINPR_JSON* obj, const char* key, uint64_t return 0; } - WINPR_JSON* item = WINPR_JSON_GetObjectItem(obj, key); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(obj, key); return uint_from_json_item(item, max); } @@ -2839,7 +2839,7 @@ static BOOL systemtime_from_json(const WINPR_JSON* pobj, const char* key, SYSTEM if (!pobj || !WINPR_JSON_IsObject(pobj)) return FALSE; - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(pobj, key); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(pobj, key); if (!obj || !WINPR_JSON_IsObject(obj)) return FALSE; @@ -3017,7 +3017,7 @@ static BOOL bitmap_cache_v2_from_json(BITMAP_CACHE_V2_CELL_INFO* info, const WIN if (errno != 0) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, "persistent"); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, "persistent"); if (!item || !WINPR_JSON_IsBool(item)) return FALSE; @@ -3061,7 +3061,7 @@ static BOOL client_cookie_from_json(ARC_CS_PRIVATE_PACKET* cookie, const WINPR_J if (errno != 0) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, "securityVerifier"); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, "securityVerifier"); if (!item || !WINPR_JSON_IsArray(item)) return FALSE; @@ -3113,7 +3113,7 @@ static BOOL server_cookie_from_json(ARC_SC_PRIVATE_PACKET* cookie, const WINPR_J if (errno != 0) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, "arcRandomBits"); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, "arcRandomBits"); if (!item || !WINPR_JSON_IsArray(item)) return FALSE; @@ -3163,7 +3163,7 @@ static BOOL channel_def_from_json(CHANNEL_DEF* cookie, const WINPR_JSON* json) if (errno != 0) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, "name"); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, "name"); if (!item || !WINPR_JSON_IsString(item)) return FALSE; @@ -3203,7 +3203,7 @@ static BOOL monitor_attributes_from_json(MONITOR_ATTRIBUTES* attributes, const W if (!json || !WINPR_JSON_IsObject(json)) return FALSE; - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, "attributes"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "attributes"); if (!obj || !WINPR_JSON_IsObject(obj)) return FALSE; @@ -3233,7 +3233,7 @@ static BOOL monitor_def_from_json(rdpMonitor* monitor, const WINPR_JSON* json) if (errno != 0) return FALSE; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, "is_primary"); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, "is_primary"); if (!item) return FALSE; if (!WINPR_JSON_IsBool(item)) @@ -4022,8 +4022,8 @@ static BOOL addin_argv_from_json(rdpSettings* settings, const WINPR_JSON* json, WINPR_JSON* val = WINPR_JSON_GetArrayItem(json, x); if (val && WINPR_JSON_IsObject(val)) { - WINPR_JSON* jargc = WINPR_JSON_GetObjectItem(val, "argc"); - WINPR_JSON* array = WINPR_JSON_GetObjectItem(val, "argv"); + WINPR_JSON* jargc = WINPR_JSON_GetObjectItemCaseSensitive(val, "argc"); + WINPR_JSON* array = WINPR_JSON_GetObjectItemCaseSensitive(val, "argv"); if (!jargc || !array) continue; if (!WINPR_JSON_IsNumber(jargc) || !WINPR_JSON_IsArray(array)) @@ -4067,7 +4067,7 @@ static BOOL addin_argv_from_json(rdpSettings* settings, const WINPR_JSON* json, static char* get_string(const WINPR_JSON* json, const char* key) { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, key); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, key); if (!item || !WINPR_JSON_IsString(item)) return NULL; const char* str = WINPR_JSON_GetStringValue(item); @@ -4076,7 +4076,7 @@ static char* get_string(const WINPR_JSON* json, const char* key) static BOOL get_bool(const WINPR_JSON* json, const char* key) { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(json, key); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(json, key); if (!item || !WINPR_JSON_IsBool(item)) return FALSE; return WINPR_JSON_IsTrue(item); @@ -4197,7 +4197,7 @@ static BOOL deserialize_pointer(const WINPR_JSON* json, rdpSettings* settings, if (!WINPR_JSON_HasObjectItem(json, name)) return FALSE; - WINPR_JSON* jval = WINPR_JSON_GetObjectItem(json, name); + WINPR_JSON* jval = WINPR_JSON_GetObjectItemCaseSensitive(json, name); if (!WINPR_JSON_IsNull(jval) && !WINPR_JSON_IsArray(jval)) return FALSE; @@ -4304,39 +4304,39 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) if (!settings) goto fail; - WINPR_JSON* jbool = WINPR_JSON_GetObjectItem( + WINPR_JSON* jbool = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_BOOL)); if (!jbool) goto fail; - WINPR_JSON* juint16 = WINPR_JSON_GetObjectItem( + WINPR_JSON* juint16 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT16)); if (!juint16) goto fail; - WINPR_JSON* jint16 = WINPR_JSON_GetObjectItem( + WINPR_JSON* jint16 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT16)); if (!jint16) goto fail; - WINPR_JSON* juint32 = WINPR_JSON_GetObjectItem( + WINPR_JSON* juint32 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT32)); if (!juint32) goto fail; - WINPR_JSON* jint32 = WINPR_JSON_GetObjectItem( + WINPR_JSON* jint32 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT32)); if (!jint32) goto fail; - WINPR_JSON* juint64 = WINPR_JSON_GetObjectItem( + WINPR_JSON* juint64 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT64)); if (!juint64) goto fail; - WINPR_JSON* jint64 = WINPR_JSON_GetObjectItem( + WINPR_JSON* jint64 = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT64)); if (!jint64) goto fail; - WINPR_JSON* jstring = WINPR_JSON_GetObjectItem( + WINPR_JSON* jstring = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_STRING)); if (!jstring) goto fail; - WINPR_JSON* jpointer = WINPR_JSON_GetObjectItem( + WINPR_JSON* jpointer = WINPR_JSON_GetObjectItemCaseSensitive( json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_POINTER)); if (!jpointer) goto fail; @@ -4395,7 +4395,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) { case RDP_SETTINGS_TYPE_BOOL: { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(jbool, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(jbool, name); if (!item) goto fail; if (!WINPR_JSON_IsBool(item)) @@ -4407,7 +4407,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) break; case RDP_SETTINGS_TYPE_UINT16: { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(juint16, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(juint16, name); const uint16_t val = (uint16_t)uint_from_json_item(item, UINT16_MAX); if (errno != 0) goto fail; @@ -4417,7 +4417,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) break; case RDP_SETTINGS_TYPE_INT16: { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(jint16, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(jint16, name); const int16_t val = (int16_t)int_from_json_item(item, INT16_MIN, INT16_MAX); if (errno != 0) goto fail; @@ -4427,7 +4427,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) break; case RDP_SETTINGS_TYPE_UINT32: { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(juint32, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(juint32, name); const uint32_t val = (uint32_t)uint_from_json_item(item, UINT32_MAX); if (errno != 0) goto fail; @@ -4455,7 +4455,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) break; case RDP_SETTINGS_TYPE_INT64: { - WINPR_JSON* item = WINPR_JSON_GetObjectItem(jint64, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(jint64, name); const int64_t val = int_from_json_item(item, INT64_MIN, INT64_MAX); if (errno != 0) goto fail; @@ -4466,7 +4466,7 @@ rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length) case RDP_SETTINGS_TYPE_STRING: { const char* val = NULL; - WINPR_JSON* item = WINPR_JSON_GetObjectItem(jstring, name); + WINPR_JSON* item = WINPR_JSON_GetObjectItemCaseSensitive(jstring, name); if (item && !WINPR_JSON_IsNull(item)) { if (!WINPR_JSON_IsString(item)) diff --git a/libfreerdp/core/aad.c b/libfreerdp/core/aad.c index e7eceb514..a6a33501e 100644 --- a/libfreerdp/core/aad.c +++ b/libfreerdp/core/aad.c @@ -92,7 +92,7 @@ static BOOL json_get_object(wLog* wlog, WINPR_JSON* json, const char* key, WINPR return FALSE; } - WINPR_JSON* prop = WINPR_JSON_GetObjectItem(json, key); + WINPR_JSON* prop = WINPR_JSON_GetObjectItemCaseSensitive(json, key); if (!prop) { WLog_Print(wlog, WLOG_ERROR, "[json] object for key '%s' is NULL", key); @@ -211,7 +211,7 @@ static BOOL aad_get_nonce(rdpAad* aad) if (!ensure_wellknown(aad->rdpcontext)) return FALSE; - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(rdp->wellknown, "token_endpoint"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(rdp->wellknown, "token_endpoint"); if (!obj) { WLog_Print(aad->log, WLOG_ERROR, "wellknown does not have 'token_endpoint', aborting"); @@ -856,7 +856,7 @@ char* freerdp_utils_aad_get_access_token(wLog* log, const char* data, size_t len goto cleanup; } - access_token_prop = WINPR_JSON_GetObjectItem(json, "access_token"); + access_token_prop = WINPR_JSON_GetObjectItemCaseSensitive(json, "access_token"); if (!access_token_prop) { WLog_Print(log, WLOG_ERROR, "Response has no \"access_token\" property"); @@ -912,7 +912,7 @@ const char* freerdp_utils_aad_get_wellknown_custom_string(rdpContext* context, c if (!ensure_wellknown(context)) return NULL; - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(context->rdp->wellknown, which); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(context->rdp->wellknown, which); if (!obj) return NULL; @@ -988,7 +988,7 @@ WINPR_JSON* freerdp_utils_aad_get_wellknown_custom_object(rdpContext* context, c if (!ensure_wellknown(context)) return NULL; - return WINPR_JSON_GetObjectItem(context->rdp->wellknown, which); + return WINPR_JSON_GetObjectItemCaseSensitive(context->rdp->wellknown, which); } WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1) diff --git a/libfreerdp/core/gateway/arm.c b/libfreerdp/core/gateway/arm.c index d13be19f8..86b04376d 100644 --- a/libfreerdp/core/gateway/arm.c +++ b/libfreerdp/core/gateway/arm.c @@ -626,7 +626,7 @@ static BOOL arm_pick_base64Utf16Field(wLog* log, const WINPR_JSON* json, const c static size_t arm_parse_ipvx_count(WINPR_JSON* ipvX) { WINPR_ASSERT(ipvX); - WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipvX, "ipAddress"); + WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipvX, "ipAddress"); if (!ipAddress || !WINPR_JSON_IsArray(ipAddress)) return 0; return WINPR_JSON_GetArraySize(ipAddress); @@ -641,7 +641,7 @@ static BOOL arm_parse_ipv6(rdpSettings* settings, WINPR_JSON* ipv6, size_t* pAdd if (!freerdp_settings_get_bool(settings, FreeRDP_IPv6Enabled)) return TRUE; - WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipv6, "ipAddress"); + WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipv6, "ipAddress"); if (!ipAddress || !WINPR_JSON_IsArray(ipAddress)) return TRUE; const size_t naddresses = WINPR_JSON_GetArraySize(ipAddress); @@ -667,7 +667,7 @@ static BOOL arm_parse_ipv4(rdpSettings* settings, WINPR_JSON* ipv4, size_t* pAdd WINPR_ASSERT(ipv4); WINPR_ASSERT(pAddressIdx); - WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipv4, "ipAddress"); + WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipv4, "ipAddress"); if (!ipAddress || !WINPR_JSON_IsArray(ipAddress)) return TRUE; @@ -678,7 +678,8 @@ static BOOL arm_parse_ipv4(rdpSettings* settings, WINPR_JSON* ipv4, size_t* pAdd if (!adressN) continue; - WINPR_JSON* publicIpNode = WINPR_JSON_GetObjectItem(adressN, "publicIpAddress"); + WINPR_JSON* publicIpNode = + WINPR_JSON_GetObjectItemCaseSensitive(adressN, "publicIpAddress"); if (publicIpNode && WINPR_JSON_IsString(publicIpNode)) { const char* publicIp = WINPR_JSON_GetStringValue(publicIpNode); @@ -690,7 +691,8 @@ static BOOL arm_parse_ipv4(rdpSettings* settings, WINPR_JSON* ipv4, size_t* pAdd } } - WINPR_JSON* privateIpNode = WINPR_JSON_GetObjectItem(adressN, "privateIpAddress"); + WINPR_JSON* privateIpNode = + WINPR_JSON_GetObjectItemCaseSensitive(adressN, "privateIpAddress"); if (privateIpNode && WINPR_JSON_IsString(privateIpNode)) { const char* privateIp = WINPR_JSON_GetStringValue(privateIpNode); @@ -722,7 +724,7 @@ static BOOL arm_treat_azureInstanceNetworkMetadata(wLog* log, const char* metada return FALSE; } - WINPR_JSON* iface = WINPR_JSON_GetObjectItem(json, "interface"); + WINPR_JSON* iface = WINPR_JSON_GetObjectItemCaseSensitive(json, "interface"); if (!iface) { ret = TRUE; @@ -750,11 +752,11 @@ static BOOL arm_treat_azureInstanceNetworkMetadata(wLog* log, const char* metada if (!interN) continue; - WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItem(interN, "ipv6"); + WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItemCaseSensitive(interN, "ipv6"); if (ipv6) count += arm_parse_ipvx_count(ipv6); - WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItem(interN, "ipv4"); + WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItemCaseSensitive(interN, "ipv4"); if (ipv4) count += arm_parse_ipvx_count(ipv4); } @@ -769,14 +771,14 @@ static BOOL arm_treat_azureInstanceNetworkMetadata(wLog* log, const char* metada if (!interN) continue; - WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItem(interN, "ipv6"); + WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItemCaseSensitive(interN, "ipv6"); if (ipv6) { if (!arm_parse_ipv6(settings, ipv6, &addressIdx)) goto out; } - WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItem(interN, "ipv4"); + WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItemCaseSensitive(interN, "ipv4"); if (ipv4) { if (!arm_parse_ipv4(settings, ipv4, &addressIdx)) @@ -885,7 +887,8 @@ static BOOL arm_fill_gateway_parameters(rdpArm* arm, const char* message, size_t goto fail; } - WINPR_JSON* serverNameNode = WINPR_JSON_GetObjectItem(json, "redirectedServerName"); + WINPR_JSON* serverNameNode = + WINPR_JSON_GetObjectItemCaseSensitive(json, "redirectedServerName"); if (serverNameNode) { const char* serverName = WINPR_JSON_GetStringValue(serverNameNode); @@ -896,7 +899,7 @@ static BOOL arm_fill_gateway_parameters(rdpArm* arm, const char* message, size_t } } - WINPR_JSON* userNameNode = WINPR_JSON_GetObjectItem(json, "redirectedUserName"); + WINPR_JSON* userNameNode = WINPR_JSON_GetObjectItemCaseSensitive(json, "redirectedUserName"); if (userNameNode) { const char* userName = WINPR_JSON_GetStringValue(userNameNode); @@ -904,7 +907,8 @@ static BOOL arm_fill_gateway_parameters(rdpArm* arm, const char* message, size_t goto fail; } - WINPR_JSON* azureMeta = WINPR_JSON_GetObjectItem(json, "azureInstanceNetworkMetadata"); + WINPR_JSON* azureMeta = + WINPR_JSON_GetObjectItemCaseSensitive(json, "azureInstanceNetworkMetadata"); if (azureMeta && WINPR_JSON_IsString(azureMeta)) { if (!arm_treat_azureInstanceNetworkMetadata(arm->log, WINPR_JSON_GetStringValue(azureMeta), diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 5ee6ba319..ee469af48 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -1509,7 +1509,7 @@ static BOOL tls_extract_full_pem(const rdpCertificate* cert, BYTE** PublicKey, static int tls_config_parse_bool(WINPR_JSON* json, const char* opt) { - WINPR_JSON* val = WINPR_JSON_GetObjectItem(json, opt); + WINPR_JSON* val = WINPR_JSON_GetObjectItemCaseSensitive(json, opt); if (!val || !WINPR_JSON_IsBool(val)) return -1; @@ -1525,7 +1525,7 @@ static int tls_config_check_allowed_hashed(const char* configfile, const rdpCert WINPR_ASSERT(cert); WINPR_ASSERT(json); - WINPR_JSON* db = WINPR_JSON_GetObjectItem(json, "certificate-db"); + WINPR_JSON* db = WINPR_JSON_GetObjectItemCaseSensitive(json, "certificate-db"); if (!db || !WINPR_JSON_IsArray(db)) return 0; @@ -1540,7 +1540,7 @@ static int tls_config_check_allowed_hashed(const char* configfile, const rdpCert continue; } - WINPR_JSON* key = WINPR_JSON_GetObjectItem(cur, "type"); + WINPR_JSON* key = WINPR_JSON_GetObjectItemCaseSensitive(cur, "type"); if (!key || !WINPR_JSON_IsString(key)) { WLog_WARN(TAG, @@ -1549,7 +1549,7 @@ static int tls_config_check_allowed_hashed(const char* configfile, const rdpCert configfile, x); continue; } - WINPR_JSON* val = WINPR_JSON_GetObjectItem(cur, "hash"); + WINPR_JSON* val = WINPR_JSON_GetObjectItemCaseSensitive(cur, "hash"); if (!val || !WINPR_JSON_IsString(val)) { WLog_WARN(TAG, diff --git a/libfreerdp/locale/keyboard_layout.c b/libfreerdp/locale/keyboard_layout.c index 6d3a117dd..795d4d9c3 100644 --- a/libfreerdp/locale/keyboard_layout.c +++ b/libfreerdp/locale/keyboard_layout.c @@ -1021,7 +1021,7 @@ static char* get_object_str(WINPR_JSON* json, size_t pos, const char* name) name); return NULL; } - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, name); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, name); WINPR_ASSERT(obj); if (!WINPR_JSON_IsString(obj)) { @@ -1051,7 +1051,7 @@ static UINT32 get_object_integer(WINPR_JSON* json, size_t pos, const char* name) name); return 0; } - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, name); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, name); WINPR_ASSERT(obj); if (!WINPR_JSON_IsNumber(obj)) { @@ -1249,17 +1249,17 @@ static BOOL CALLBACK load_layouts(PINIT_ONCE once, PVOID param, PVOID* context) clear_layout_tables(); { - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, "KeyboardLayouts"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "KeyboardLayouts"); if (!parse_layout_entries(obj, filename)) goto end; } { - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, "KeyboardVariants"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "KeyboardVariants"); if (!parse_variant_entries(obj, filename)) goto end; } { - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, "KeyboardIme"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "KeyboardIme"); if (!parse_ime_entries(obj, filename)) goto end; } diff --git a/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c b/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c index 666fa93c7..be0c2a757 100644 --- a/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c +++ b/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c @@ -103,7 +103,7 @@ static char* tz_get_object_str(WINPR_JSON* json, size_t pos, const char* name) name); return NULL; } - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, name); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, name); WINPR_ASSERT(obj); if (!WINPR_JSON_IsString(obj)) { @@ -207,7 +207,7 @@ static BOOL CALLBACK load_timezones(PINIT_ONCE once, PVOID param, PVOID* pvconte goto end; } - WINPR_JSON* obj = WINPR_JSON_GetObjectItem(json, "TimeZoneNameMap"); + WINPR_JSON* obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "TimeZoneNameMap"); if (!WINPR_JSON_IsArray(obj)) { WLog_WARN(TAG, "Invalid top level JSON type in file %s, expected an array", filename);