| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,12 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 3 | + ## [0.21.1](https://github.com/nodejs/gyp-next/compare/v0.21.0...v0.21.1) (2026-01-24) | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ### Bug Fixes | ||
| 7 | + | ||
| 8 | + * replace weak hash functions with SHA-256 ([#329](https://github.com/nodejs/gyp-next/issues/329)) ([958029e](https://github.com/nodejs/gyp-next/commit/958029e6e4969a871d15e78cd083bb102bebb381)) | ||
| 9 | + | ||
| 3 | 10 | ## [0.21.0](https://github.com/nodejs/gyp-next/compare/v0.20.5...v0.21.0) (2025-11-04) | |
| 4 | 11 | ||
| 5 | 12 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,7 @@ def MakeGuid(name, seed="msvs_new"): | |||
| 34 | 34 | ||
| 35 | 35 | Args: | |
| 36 | 36 | name: Target name. | |
| 37 | - seed: Seed for MD5 hash. | ||
| 37 | + seed: Seed for SHA-256 hash. | ||
| 38 | 38 | Returns: | |
| 39 | 39 | A GUID-line string calculated from the name and seed. | |
| 40 | 40 | ||
@@ -44,8 +44,8 @@ def MakeGuid(name, seed="msvs_new"): | |||
| 44 | 44 | determine the GUID to refer to explicitly. It also means that the GUID will | |
| 45 | 45 | not change when the project for a target is rebuilt. | |
| 46 | 46 | """ | |
| 47 | - # Calculate a MD5 signature for the seed and name. | ||
| 48 | - d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper() | ||
| 47 | + # Calculate a SHA-256 signature for the seed and name. | ||
| 48 | + d = hashlib.sha256((str(seed) + str(name)).encode("utf-8")).hexdigest().upper() | ||
| 49 | 49 | # Convert most of the signature to GUID form (discard the rest) | |
| 50 | 50 | guid = ( | |
| 51 | 51 | "{" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2169,7 +2169,7 @@ def WriteMakeRule( | |||
| 2169 | 2169 | # - The multi-output rule will have an do-nothing recipe. | |
| 2170 | 2170 | ||
| 2171 | 2171 | # Hash the target name to avoid generating overlong filenames. | |
| 2172 | - cmddigest = hashlib.sha1( | ||
| 2172 | + cmddigest = hashlib.sha256( | ||
| 2173 | 2173 | (command or self.target).encode("utf-8") | |
| 2174 | 2174 | ).hexdigest() | |
| 2175 | 2175 | intermediate = "%s.intermediate" % cmddigest | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -809,9 +809,8 @@ def cygwin_munge(path): | |||
| 809 | 809 | outputs = [self.GypPathToNinja(o, env) for o in outputs] | |
| 810 | 810 | if self.flavor == "win": | |
| 811 | 811 | # WriteNewNinjaRule uses unique_name to create a rsp file on win. | |
| 812 | - extra_bindings.append( | ||
| 813 | - ("unique_name", hashlib.md5(outputs[0]).hexdigest()) | ||
| 814 | - ) | ||
| 812 | + unique_name = hashlib.sha256(outputs[0].encode("utf-8")).hexdigest() | ||
| 813 | + extra_bindings.append(("unique_name", unique_name)) | ||
| 815 | 814 | ||
| 816 | 815 | self.ninja.build( | |
| 817 | 816 | outputs, | |
@@ -2803,7 +2802,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name | |||
| 2803 | 2802 | build_file, name, toolset | |
| 2804 | 2803 | ) | |
| 2805 | 2804 | qualified_target_for_hash = qualified_target_for_hash.encode("utf-8") | |
| 2806 | - hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest() | ||
| 2805 | + hash_for_rules = hashlib.sha256(qualified_target_for_hash).hexdigest() | ||
| 2807 | 2806 | ||
| 2808 | 2807 | base_path = os.path.dirname(build_file) | |
| 2809 | 2808 | obj = "obj" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -429,7 +429,7 @@ def _HashUpdate(hash, data): | |||
| 429 | 429 | hash.update(data) | |
| 430 | 430 | ||
| 431 | 431 | if seed_hash is None: | |
| 432 | - seed_hash = hashlib.sha1() | ||
| 432 | + seed_hash = hashlib.sha256() | ||
| 433 | 433 | ||
| 434 | 434 | hash = seed_hash.copy() | |
| 435 | 435 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |||
| 4 | 4 | ||
| 5 | 5 | [project] | |
| 6 | 6 | name = "gyp-next" | |
| 7 | - version = "0.21.0" | ||
| 7 | + version = "0.21.1" | ||
| 8 | 8 | authors = [ | |
| 9 | 9 | { name="Node.js contributors", email="ryzokuken@disroot.org" }, | |
| 10 | 10 | ] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments