mirror of
https://github.com/google/nomulus
synced 2026-09-09 09:36:12 +00: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:
+10
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user