mirror of
https://github.com/google/nomulus.git
synced 2025-06-05 03:57:29 +02:00
Use the registrar client ID and abuse email address in Spec11
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244899045
This commit is contained in:
parent
9f979790e4
commit
2b12ca42f5
9 changed files with 87 additions and 27 deletions
|
@ -98,12 +98,12 @@ public class Spec11RegistrarThreatMatchesParser {
|
|||
|
||||
private RegistrarThreatMatches parseRegistrarThreatMatch(String line) throws JSONException {
|
||||
JSONObject reportJSON = new JSONObject(line);
|
||||
String registrarEmail = reportJSON.getString(Spec11Pipeline.REGISTRAR_EMAIL_FIELD);
|
||||
String clientId = reportJSON.getString(Spec11Pipeline.REGISTRAR_CLIENT_ID_FIELD);
|
||||
JSONArray threatMatchesArray = reportJSON.getJSONArray(Spec11Pipeline.THREAT_MATCHES_FIELD);
|
||||
ImmutableList.Builder<ThreatMatch> threatMatches = ImmutableList.builder();
|
||||
for (int i = 0; i < threatMatchesArray.length(); i++) {
|
||||
threatMatches.add(ThreatMatch.fromJSON(threatMatchesArray.getJSONObject(i)));
|
||||
}
|
||||
return RegistrarThreatMatches.create(registrarEmail, threatMatches.build());
|
||||
return RegistrarThreatMatches.create(clientId, threatMatches.build());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue