Giter VIP home page Giter VIP logo

Comments (2)

ceharris avatar ceharris commented on June 1, 2024

Apparently no one has been using authNoPriv mode, since it's pretty obviously broken. Thanks for reporting it!

The constructor for the UsmUser class in SNMP4j will accept null for the privacy protocol and passphrase. It will also accept null for the auth protocol and auth passphrase.

The fix for this is pretty straightforward.

  1. Return null early in the privType method if the priv type specified in v3Target is null. Same change in the authType method.
  2. Introduce private privPassphrase and authPassphrase methods that return null if the corresponding type property in v3Target is null or the passphrase is null, otherwise return the passphrase string wrapped in an OctetString. Use the new methods in place of the direct calls to the OctetString constructor in the call to the UsmUser constructor.

If you'd like to get this fixed quickly, you could do a pull request that implements the above changes.

If you don't submit a PR for it, I'll fix myself in a subsequent release the next time I give this project some cycles.

from tnm4j.

ceharris avatar ceharris commented on June 1, 2024

Fixed by #26

from tnm4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.