The KeyPath.TryParse method in NBitcoin currently accepts certain inputs that I believe should not be accepted:
-
Multiple Consecutive Slashes: Paths like /1/// are accepted due to the removal of empty values when splitting the path by '/'.
-
Incorrect Handling of -0: Paths such as /-0/-0/-0 are incorrectly accepted. This happens because KeyPath.TryParse internally calls uint.Parse(), which treats -0 as a valid unsigned integer (0).