Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: restrict PBKDF2 args to signed int #44575

Merged
merged 1 commit into from Sep 10, 2022

Commits on Sep 8, 2022

  1. crypto: restrict PBKDF2 args to signed int

    OpenSSL internally represents the output length and the iteration count
    as signed integers, which is why node's C++ implementation expects these
    arguments to fit into signed integers as well. The JavaScript validation
    logic, however, only requires the arguments to be unsigned 32-bit
    integers, which is a superset of non-negative (signed) 32-bit integers.
    
    Change the JavaScript validation to match the expectation within C++.
    
    Fixes: nodejs#44570
    tniessen committed Sep 8, 2022
    Copy the full SHA
    3927e1a View commit details
    Browse the repository at this point in the history