Also check if the path and id are the same
The sensorId can contain characters which have special meaning in regexes. We cannot escape them however because we also pass sensor regexes through the same path. So simply compare for equality before doing any matching.
Showing with 1 addition and 1 deletion