mirror of
https://github.com/google/nomulus.git
synced 2025-06-11 15:04:46 +02:00
Validate potentially-invalid domain names when (un)locking domains (#698)
* Validate potentially-invalid domain names when (un)locking domains
This commit is contained in:
parent
11eeda4233
commit
d10aea2ff1
2 changed files with 12 additions and 0 deletions
|
@ -280,6 +280,16 @@ public final class RegistryLockPostActionTest {
|
|||
assertFailureWithMessage(response, "Missing key for domainName");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_nonPunycodeDomainName() {
|
||||
Map<String, ?> response = action.handleJsonRequest(ImmutableMap.of(
|
||||
"isLock", true,
|
||||
"registrarId", "TheRegistrar",
|
||||
"domainName", "example.みんな",
|
||||
"password", "hi"));
|
||||
assertFailureWithMessage(response, "Domain names can only contain a-z, 0-9, '.' and '-'");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noLockParam() {
|
||||
Map<String, ?> response =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue