markabrahams / node-net-snmp

JavaScript implementation of the Simple Network Management Protocol (SNMP)
206 stars 97 forks source link

Fix string size constraints #228

Closed abutcher-gh closed 1 year ago

abutcher-gh commented 1 year ago

Length constraints were not being applied when handling sets as the constraints object mistakenly used size rather than sizes which is what the applying code expects.

Also, at least in my latest node version, checking for length in a string threw an exception; so I changed it to an undefined check.

markabrahams commented 1 year ago

Again, thank you! This is also merged and published in version 3.9.4 of the npm.