Skip to content

chore: constrain wildcard position in network.allow domain patterns #181

@jamesadevine

Description

@jamesadevine

Problem

The DNS validation in generate_allowed_domains allows * anywhere in a domain (ex*ample.com, *.*.com), not just as a leading prefix. While * cannot break shell quoting (so this is not a security issue), the documented intent is for patterns like *.mycompany.com.

Tightening to host.starts_with("*.") || !host.contains('*') would match the documented convention and avoid surprising behavior if a user types example.* or *.*.com.

Context

Found during review of #175 (security audit fixes). Not a security issue — purely a correctness/UX improvement.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions