fix(web): address wildcard host review
This commit is contained in:
@@ -339,6 +339,15 @@ describe.skipIf(!existsSync(dshBin))('dsh BUILT bin (node lib/bin.js, no tsx)',
|
||||
expect(web.stdout).toContain('--port <port>')
|
||||
expect(web.stdout).not.toContain('dsh web: http://')
|
||||
|
||||
const wildcardHost = await runBuiltBin(['web', '--host', '0.0.0.0'], {
|
||||
DSH_HOME: home,
|
||||
DSH_TELEMETRY_DISABLED: '1',
|
||||
})
|
||||
expect(wildcardHost.code).toBe(1)
|
||||
expect(wildcardHost.stdout).toBe('')
|
||||
expect(wildcardHost.stderr).toContain('--host 0.0.0.0 is intentionally not supported yet for safety: it would expose remote code execution to the network; use 127.0.0.1 instead')
|
||||
expect(wildcardHost.stderr).not.toContain('dsh web: http://')
|
||||
|
||||
const headlessHelp = await runBuiltBin(['--profile', 'headless', '--help'], {
|
||||
DSH_HOME: home,
|
||||
DSH_TELEMETRY_DISABLED: '1',
|
||||
|
||||
Reference in New Issue
Block a user