node icon indicating copy to clipboard operation
node copied to clipboard

build: fix C string encoding for `PRODUCT_DIR_ABS`

Open addaleax opened this issue 1 year ago • 4 comments

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

addaleax avatar Dec 02 '24 13:12 addaleax

Review requested:

  • [ ] @nodejs/gyp
  • [ ] @nodejs/security-wg

nodejs-github-bot avatar Dec 02 '24 13:12 nodejs-github-bot

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     

see 32 files with indirect coverage changes

codecov[bot] avatar Dec 02 '24 15:12 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63868/

nodejs-github-bot avatar Dec 04 '24 11:12 nodejs-github-bot

@addaleax The build is broken, can you take a look ? also long time no see :)

gengjiawen avatar Dec 05 '24 01:12 gengjiawen

@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)

addaleax avatar Dec 09 '24 16:12 addaleax

@gengjiawen Updated! 🙂

addaleax avatar Dec 10 '24 19:12 addaleax

CI: https://ci.nodejs.org/job/node-test-pull-request/63981/

nodejs-github-bot avatar Dec 10 '24 19:12 nodejs-github-bot

Landed in e5524eaefae48034e4c8cc1a960fd65df4d03161...203398dd18c6fcda92a10644ac1abf00f3cf9df2

nodejs-github-bot avatar Dec 12 '24 18:12 nodejs-github-bot