You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auth:ntlm parsing throws TypeError when the domain line is absent #8695
Title:auth:ntlm parsing throws TypeError when the domain line is absent
I have checked the following
I have searched existing issues and found nothing related to my issue.
This bug is
making Bruno unusable for me (a valid .bru fails to open / import throws)
Bruno version
2.0.0 (@usebruno/lang 0.12.0; reproduced on main @ 7ef252f)
Operating System
macOS 15 / any (pure parser)
Describe the bug
The authNTLM semantic action in bruToJson.js guards the domain lookup with the wrong key: it checks passwordKey but dereferences domainKey. An auth:ntlm block with username/password and no domain line makes passwordKey truthy, so the code reads domainKey.value on an undefineddomainKey and throws. A request .bru with NTLM auth and no explicit domain fails to parse.
Steps to reproduce
constbruToJson=require('@usebruno/lang').bruToJsonV2;constbru=`auth:ntlm { username: u password: p}`;bruToJson(bru);// throws
Output:
TypeError: Cannot read properties of undefined (reading 'value')
Actual: throws TypeError: Cannot read properties of undefined (reading 'value').
Root cause
packages/bruno-lang/v2/src/bruToJson.js:797:
constdomain=passwordKey ? domainKey.value : '';
The guard should be domainKey.
Suggested fix
constdomain=domainKey ? domainKey.value : '';
(matching the username/password patterns on the lines above).
Screenshots / Live demo
Terminal repro above (runtime-verified against main @ 7ef252f).
Found via property-based & differential bug-hunting, part of an effort to scale PBT (DepTyCheck-based) testing across the OSS ecosystem.
If this is intended / by-design: I'm really sorry, please just close it — no need to flag or ban me. I'm trying to scale property-based testing across the whole ecosystem and my publishing agents may have gotten this one wrong. I read every issue and follow up on each.
#8136 - fix(generate-code)!: generate code URL issues [merged] #8494 - fix(converters): add missing auth mappings on postman export, add additional parameters mapping on postman import [merged] #8707 - fix(lang): guard ntlm domain on domainKey, not passwordKey [open] #8739 - Skip Ohm.js parsing large bodies [open]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Confirmed on main. In authNTLM (packages/bruno-lang/v2/src/bruToJson.js), the domain line guards on passwordKey but dereferences domainKey: const domain = passwordKey ? domainKey.value : ''. An auth:ntlm block with username/password and no domain makes passwordKey truthy while domainKey is undefined, so domainKey.value throws and the .bru fails to parse. Fix guards on domainKey (matching the username/password lines), defaulting domain to an empty string. Adding a round-trip test for ntlm with and without a domain line.
Hi @haskiindahouse, thank you for taking the time to report this issue!
I've shared this with our engineering team, and it's being evaluated alongside our other product priorities. While I can't promise a timeline at the moment, we'll make sure it gets reviewed as soon as possible, and we'll share any updates as they become available.
We'll keep this thread updated with any progress or new information.
Activity
coderabbitai commentedon Jul 21, 2026
🔗 Related PRs
#8136 - fix(generate-code)!: generate code URL issues [merged]
#8494 - fix(converters): add missing auth mappings on postman export, add additional parameters mapping on postman import [merged]
#8707 - fix(lang): guard ntlm domain on domainKey, not passwordKey [open]
#8739 - Skip Ohm.js parsing large bodies [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
sbalagan22 commentedon Jul 21, 2026
Confirmed on main. In
authNTLM(packages/bruno-lang/v2/src/bruToJson.js), the domain line guards onpasswordKeybut dereferencesdomainKey:const domain = passwordKey ? domainKey.value : ''. Anauth:ntlmblock with username/password and no domain makespasswordKeytruthy whiledomainKeyis undefined, sodomainKey.valuethrows and the.brufails to parse. Fix guards ondomainKey(matching the username/password lines), defaulting domain to an empty string. Adding a round-trip test for ntlm with and without a domain line.Rohan-Bruno commentedon Jul 22, 2026
Hi @haskiindahouse, thank you for taking the time to report this issue!
I've shared this with our engineering team, and it's being evaluated alongside our other product priorities. While I can't promise a timeline at the moment, we'll make sure it gets reviewed as soon as possible, and we'll share any updates as they become available.
We'll keep this thread updated with any progress or new information.
haskiindahouse commentedon Jul 22, 2026
nice, thx very much