Closed keyCat closed 5 years ago
i'd be happy to review any PR that changes that functionality
@patrickkettner I've taken a closer look at the code and found my statement about Confidence trying to reach nodes using invalid key names to be false. As for Joi validation, I come to think that it is not relevant to the issue at all.
Please, take a look at PR, when you will have the time. Thanks a lot.
Hi,
Quoting documentation:
I think this restriction is counterintuitive and severely limits the scope of usage for Confidence while not bringing any clear benefits. In my opinion, there should not be any restrictions on key names, unless it is due to some technical or conceptual limitation.
My example: I want to create a criteria-based configuration for node modules and plugins using their canonical names, but Confidence does not support dashes.
And what is actually more concerning, when it checks for key name`s validity, it strips invalid characters and still tries to reach a key using this sanitized (modified) key name, which may result in collisions and unexpected behaviorfalse. So this is actually becomes a 2-part issue:2. Joi validation must be used to check key identifiers and exceptions must be thrown.not relevant to the issueI could help with implementation, but looking at the repo I am not sure if the project is still being maintained.
Any discussion on the topic and counterpoints are welcome.
Thanks for this great module.
UPD: Redacted false statement.