Skip to content

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Jan 4, 2024

Newer versions of brotli have changed how it defines version macros in c/common/version.h. Attempt to decode the new definitions first, falling back to the previous code to allow the parser to parse the version from both older and newer versions of brotli.

Fixes: nodejs/security-wg#1181

Newer versions of brotli have changed how it defines version macros in `c/common/version.h`. Attempt to decode the new definitions first, falling back to the previous code to allow the parser to parse the version from both older and newer versions of brotli.
@richardlau
Copy link
Member Author

FWIW:

$ cd dep_checker $ python3 Python 3.11.6 (main, Oct 3 2023, 00:00:00) [GCC 12.3.1 20230508 (Red Hat 12.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>> import versions_parser >>> versions_parser.get_brotli_version(Path("/home/rlau/sandbox/github/node")) '1.1.0' >>> versions_parser.get_brotli_version(Path("/home/rlau/sandbox/github/trees/v20.x")) '1.0.9' >>>
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richardlau richardlau merged commit 696e1fe into main Jan 5, 2024
@richardlau richardlau deleted the fix-brotli branch January 10, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants