build: fix C string encoding for `PRODUCT_DIR_ABS`
Since the PRODUCT_DIR_ABS gyp variable is meant to be used in a C string in the OpenSSL config, provide a version of it that actually provides it in a way that is always usable as a C string. Otherwise, unescaped characters in the path can mess with the string definitions; for example, building in paths on Windows whose directories start with valid or invalid escape sequences (e.g.: C:\...\x61foobar\... or C:\...\456789\...) can result in failing builds or incorrect paths provided to OpenSSL.
Needs: https://github.com/nodejs/gyp-next/pull/271
Review requested:
- [ ] @nodejs/gyp
- [ ] @nodejs/security-wg
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.54%. Comparing base (
f184a0a) to head (486ff15). Report is 222 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #56111 +/- ##
=======================================
Coverage 88.53% 88.54%
=======================================
Files 657 657
Lines 189858 189858
Branches 36450 36447 -3
=======================================
+ Hits 168089 168103 +14
+ Misses 14973 14972 -1
+ Partials 6796 6783 -13
CI: https://ci.nodejs.org/job/node-test-pull-request/63868/
@addaleax The build is broken, can you take a look ? also long time no see :)
@gengjiawen 👋
Yeah, thanks for pointing this out – https://github.com/nodejs/gyp-next/pull/274 should fix this again (sorry, I applied the suggestion provided there without checking that it works when integrated into Node.js again)
@gengjiawen Updated! 🙂
CI: https://ci.nodejs.org/job/node-test-pull-request/63981/
Landed in e5524eaefae48034e4c8cc1a960fd65df4d03161...203398dd18c6fcda92a10644ac1abf00f3cf9df2