mirror of
https://github.com/google/nomulus
synced 2026-09-08 09:07:11 +00:00
Sanitize EPP XML requests and responses
Masks user credentials (tags 'pw' and 'newPW') in EPP XML messages. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207953894
This commit is contained in:
@@ -17,8 +17,10 @@ package google.registry.model.eppinput;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.flows.EppXmlTransformer.unmarshal;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.TestDataHelper.loadBytes;
|
||||
|
||||
import google.registry.flows.EppException.SyntaxErrorException;
|
||||
import google.registry.model.contact.ContactResourceTest;
|
||||
import google.registry.model.domain.DomainResourceTest;
|
||||
import google.registry.model.eppinput.EppInput.InnerCommand;
|
||||
@@ -77,4 +79,11 @@ public class EppInputTest {
|
||||
assertThat(loginCommand.services.serviceExtensions)
|
||||
.containsExactly("urn:ietf:params:xml:ns:launch-1.0", "urn:ietf:params:xml:ns:rgp-1.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnmarshalling_loginTagInWrongCase_throws() {
|
||||
assertThrows(
|
||||
SyntaxErrorException.class,
|
||||
() -> unmarshal(EppInput.class, loadBytes(getClass(), "login_wrong_case.xml").read()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user