René's URL Explorer Experiment


Title: fs: return Buffer from mkdtemp when prefix is a Buffer by hamidrezaghavami · Pull Request #64397 · nodejs/node · GitHub

Open Graph Title: fs: return Buffer from mkdtemp when prefix is a Buffer by hamidrezaghavami · Pull Request #64397 · nodejs/node

X Title: fs: return Buffer from mkdtemp when prefix is a Buffer by hamidrezaghavami · Pull Request #64397 · nodejs/node

Description: This PR fixes an issue where passing a Buffer as the prefix to the fs.mkdtemp family of functions incorrectly returned a string, which could mangle non-UTF8 paths. The options encoding is now safely forced to 'buffer' when a Buffer prefix is detected for both the asynchronous, synchronous, and disposable versions. Fixes: #58795

Open Graph Description: This PR fixes an issue where passing a Buffer as the prefix to the fs.mkdtemp family of functions incorrectly returned a string, which could mangle non-UTF8 paths. The options encoding is now safel...

X Description: This PR fixes an issue where passing a Buffer as the prefix to the fs.mkdtemp family of functions incorrectly returned a string, which could mangle non-UTF8 paths. The options encoding is now safel...

Opengraph URL: https://github.com/nodejs/node/pull/64397

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:849565d2-6791-673a-2386-61b0a18291b6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE2F6:2B6F5F:2661915:3644C33:6AED0F37
html-safe-nonce999ab24df163706b7fe8bc4770759800cab540ed62e157bd79de3db87610e0ee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkY2OjJCNkY1RjoyNjYxOTE1OjM2NDRDMzM6NkFFRDBGMzciLCJ2aXNpdG9yX2lkIjoiMTYzNzk3NDA2MzE3NjI5MDEwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4b8918994ed358f9683d7f5a828a7df1924bc53165fbfca91280fdba01985b3f
hovercard-subject-tagpull_request:4024934861
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/64397/files
twitter:imagehttps://avatars.githubusercontent.com/u/161077982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/161077982?s=400&v=4
og:image:altThis PR fixes an issue where passing a Buffer as the prefix to the fs.mkdtemp family of functions incorrectly returned a string, which could mangle non-UTF8 paths. The options encoding is now safel...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonefe1176aafc8029267cb0358377ab58ce39547be3f743f36e1b549da3e6483a68
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release106bd81506ed8ed05cbd358a6a7d969bc8215167
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/64397/changes#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F64397%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F64397%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/64397/changes
Reloadhttps://github.com/nodejs/node/pull/64397/changes
Reloadhttps://github.com/nodejs/node/pull/64397/changes
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues655 (655)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
nodejs-github-bothttps://github.com/nodejs-github-bot
nodejs:mainhttps://github.com/nodejs/node/tree/main
hamidrezaghavami:fix-fs-mkdtemp-bufferhttps://github.com/hamidrezaghavami/node/tree/fix-fs-mkdtemp-buffer
Conversation 61 https://github.com/nodejs/node/pull/64397
Commits 20 https://github.com/nodejs/node/pull/64397/commits
Checks 42 https://github.com/nodejs/node/pull/64397/checks
Files changed https://github.com/nodejs/node/pull/64397/files
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
fs: return Buffer from mkdtemp when prefix is a Buffer https://github.com/nodejs/node/pull/64397/changes#top
Show all changes 20 commits https://github.com/nodejs/node/pull/64397/files
5721674 fs: return Buffer from mkdtemp when prefix is a Buffer hamidrezaghavami Jul 9, 2026 https://github.com/nodejs/node/pull/64397/commits/5721674276b16194f3031349a85f8c628017c6c2
4b03819 test: restore missing mkdtemp async buffer tests hamidrezaghavami Jul 11, 2026 https://github.com/nodejs/node/pull/64397/commits/4b0381965609515e3a0511dbd6274b345e9a08cf
5f6fca5 doc: update fs.mkdtemp() return types and history hamidrezaghavami Jul 12, 2026 https://github.com/nodejs/node/pull/64397/commits/5f6fca585d81339756cd220cfaf16d0939cd52f8
d7f0985 doc: physically wrap long lines in fs.md to fix markdown linter hamidrezaghavami Jul 12, 2026 https://github.com/nodejs/node/pull/64397/commits/d7f098504929668ee7f28e04f33eb90216b88e50
f7977f3 doc: fix markdown and yaml line lengths in fs.md hamidrezaghavami Jul 12, 2026 https://github.com/nodejs/node/pull/64397/commits/f7977f35d05cad6fa20e7533a7b9aa01242a680d
34885d8 doc: update mkdtempSync and fsPromises.mkdtemp docs hamidrezaghavami Jul 14, 2026 https://github.com/nodejs/node/pull/64397/commits/34885d8c57acb00dd34b924d8410659a51404095
1a8da2a doc: update disposable mkdtemp return types hamidrezaghavami Jul 22, 2026 https://github.com/nodejs/node/pull/64397/commits/1a8da2aff784f82cd8916177b10036494ef5a868
ca78ff4 doc: wrap lines in fs.md hamidrezaghavami Jul 23, 2026 https://github.com/nodejs/node/pull/64397/commits/ca78ff40ab692e06a8b7f9bc579a0b9a175b5dfa
a271708 doc: add changes blocks to mkdtempDisposable functions hamidrezaghavami Jul 23, 2026 https://github.com/nodejs/node/pull/64397/commits/a2717082e0e9f7e1662463a4c71bc2ea4c70b027
728fb8d doc: update encoding default for mkdtemp hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/728fb8d831b2189a759a58a89aad8db299ecbdbf
f4664f1 doc: update missing encoding default for fsPromises.mkdtemp hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/f4664f1b7cf27b9bd33ed3d61105455a7543fe53
11d4f55 doc: add changes YAML entries for mkdtemp encoding default hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/11d4f553acd267b7737d784832f6aef700383c2e
0b55cab Update test/parallel/test-fs-mkdtemp-buffer.js hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/0b55cab5a71bac07b4a569d7b56c56459f5edd58
c11bd20 doc: fix YAML changes indentation for mkdtemp encoding default hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/c11bd20e3f6fa727fc8477802334f8f6116fcced
cccc0fa doc: simplify version entry format for mkdtemp hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/cccc0faf3e8f6aa636e32833001e1c1820067ff5
9d77adc Update doc/api/fs.md hamidrezaghavami Sep 4, 2026 https://github.com/nodejs/node/pull/64397/commits/9d77adc42a285e90f796024cce6d36b7524b9de1
fe50452 ci: re-run workflows hamidrezaghavami Sep 5, 2026 https://github.com/nodejs/node/pull/64397/commits/fe5045248516f29bafe2f9efedcd1eff879886ff
b2b1410 doc: use REPLACEME for remaining mkdtemp versions hamidrezaghavami Sep 5, 2026 https://github.com/nodejs/node/pull/64397/commits/b2b1410d7b1be07017fd35b93505201bc057aeaa
c866ac7 doc: add missing YAML hamidrezaghavami Sep 5, 2026 https://github.com/nodejs/node/pull/64397/commits/c866ac719fd7a62bca8d4c719427a955aebc9d38
6bd088c Update doc/api/fs.md hamidrezaghavami Sep 5, 2026 https://github.com/nodejs/node/pull/64397/commits/6bd088cefc664480d5f741724efe73f140bf4b72
Clear filters https://github.com/nodejs/node/pull/64397/files
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
fs.md https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
fs.js https://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
promises.js https://github.com/nodejs/node/pull/64397/changes#diff-408a6d8eb0a23c586754d4f3af46c8b1927a32d80a6bdfd3bbd87c0f2a012b1a
test-fs-mkdtemp-buffer.js https://github.com/nodejs/node/pull/64397/changes#diff-dad3b11b3c244763833120cb01a8bb9789712cb97e1519d94649bd0ec9bedcd6
test-fs-mkdtemp.js https://github.com/nodejs/node/pull/64397/changes#diff-1394a748365d296140c9b39bdb7f7b2a03e8d0dc36f1f6e335d24a935b9ff9bc
doc/api/fs.mdhttps://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
View file https://github.com/hamidrezaghavami/node/blob/6bd088cefc664480d5f741724efe73f140bf4b72/doc/api/fs.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/64397/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
https://github.com/nodejs/node/pull/64397/changes#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2
lib/fs.jshttps://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
View file https://github.com/hamidrezaghavami/node/blob/6bd088cefc664480d5f741724efe73f140bf4b72/lib/fs.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/64397/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
https://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
https://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
https://github.com/nodejs/node/pull/64397/changes#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
lib/internal/fs/promises.jshttps://github.com/nodejs/node/pull/64397/changes#diff-408a6d8eb0a23c586754d4f3af46c8b1927a32d80a6bdfd3bbd87c0f2a012b1a
View file https://github.com/hamidrezaghavami/node/blob/6bd088cefc664480d5f741724efe73f140bf4b72/lib/internal/fs/promises.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/64397/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/64397/changes#diff-408a6d8eb0a23c586754d4f3af46c8b1927a32d80a6bdfd3bbd87c0f2a012b1a
https://github.com/nodejs/node/pull/64397/changes#diff-408a6d8eb0a23c586754d4f3af46c8b1927a32d80a6bdfd3bbd87c0f2a012b1a
https://github.com/nodejs/node/pull/64397/changes#diff-408a6d8eb0a23c586754d4f3af46c8b1927a32d80a6bdfd3bbd87c0f2a012b1a
test/parallel/test-fs-mkdtemp-buffer.jshttps://github.com/nodejs/node/pull/64397/changes#diff-dad3b11b3c244763833120cb01a8bb9789712cb97e1519d94649bd0ec9bedcd6
View file https://github.com/hamidrezaghavami/node/blob/6bd088cefc664480d5f741724efe73f140bf4b72/test/parallel/test-fs-mkdtemp-buffer.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/64397/{{ revealButtonHref }}
test/parallel/test-fs-mkdtemp.jshttps://github.com/nodejs/node/pull/64397/changes#diff-1394a748365d296140c9b39bdb7f7b2a03e8d0dc36f1f6e335d24a935b9ff9bc
View file https://github.com/hamidrezaghavami/node/blob/6bd088cefc664480d5f741724efe73f140bf4b72/test/parallel/test-fs-mkdtemp.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/64397/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/64397/changes#diff-1394a748365d296140c9b39bdb7f7b2a03e8d0dc36f1f6e335d24a935b9ff9bc
https://github.com/nodejs/node/pull/64397/changes#diff-1394a748365d296140c9b39bdb7f7b2a03e8d0dc36f1f6e335d24a935b9ff9bc
Please reload this pagehttps://github.com/nodejs/node/pull/64397/changes
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.