Azure / Azure/azure-iot-service-sdk-java
Key cannot contain '$', '.', or space
- Dominant language
- Java
- Stars
- 5
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Validation of key in function
private void validateKey(String key) throws IllegalArgumentException
Class MethodParser incorrectly disallows spaces. According to the docs concerning direct methods
"
When you invoke a direct method on a device, property names and values can only contain US-ASCII printable alphanumeric, except any in the following set: {'$', '(', ')', '<', '>', '@', ',', ';', ':', '\', '"', '/', '[', ']', '?', '=', '{', '}', SP, HT}
"
https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-direct-methods
Additionally the azure portal direct method invocation allows the use of the period '.' character
The offending code can be found in the following package
package com.microsoft.azure.sdk.iot.service.methods.serializers;
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate validateKey in the com.microsoft.azure.sdk.iot.service.methods.serializers package and compare its rejected characters with the linked direct-method documentation and Azure portal behavior. Confirm which key characters should be accepted, then verify that validation matches those requirements with the repository's relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100