Test_Domain_Security_InvalidDomainChars tests that invalid domain characters are rejected
(t *testing.T)
| 1604 | |
| 1605 | // Test_Domain_Security_InvalidDomainChars tests that invalid domain characters are rejected |
| 1606 | func Test_Domain_Security_InvalidDomainChars(t *testing.T) { |
| 1607 | t.Parallel() |
| 1608 | |
| 1609 | require.Panics(t, func() { |
| 1610 | parseDomainPattern("example$.com") |
| 1611 | }) |
| 1612 | |
| 1613 | require.Panics(t, func() { |
| 1614 | parseDomainPattern("example@domain.com") |
| 1615 | }) |
| 1616 | |
| 1617 | require.Panics(t, func() { |
| 1618 | parseDomainPattern("example domain.com") |
| 1619 | }) |
| 1620 | } |
| 1621 | |
| 1622 | // Test_Domain_Security_TooManyParts tests DoS protection against excessive domain labels |
| 1623 | func Test_Domain_Security_TooManyParts(t *testing.T) { |
nothing calls this directly
no test coverage detected