mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02: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:
parent
9eec70729f
commit
81fce674d2
11 changed files with 415 additions and 3 deletions
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue