Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow partyinfo to update url #952

Merged
merged 3 commits into from
Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public PartyInfo updatePartyInfo(final PartyInfo partyInfo) {

if (!this.validateKeysToUrls(existingPartyInfo, partyInfo)) {
LOGGER.warn(
"Attempt is being made to update existing key with new url. Terminating party info update.");
return this.getPartyInfo();
"Attempt is being made to update existing key with new url. " +
"Please switch on remote key validation to avoid a security breach.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public void createWithFactoryConstructor() throws Exception {
}

@Test
public void attemptToUpdateRecipientWithExistingKeyWithNewUrlIsIgnoredIfToggleDisabled() {
public void attemptToUpdateRecipientWithExistingKeyWithNewUrlIfToggleDisabled() {
// setup services
final FeatureToggles featureToggles = new FeatureToggles();
featureToggles.setEnableRemoteKeyValidation(false);
Expand Down Expand Up @@ -305,6 +305,7 @@ public void attemptToUpdateRecipientWithExistingKeyWithNewUrlIsIgnoredIfToggleDi
assertThat(updatedInfo.getRecipients()).hasSize(1).containsExactly(new Recipient(testKey, uri));
verify(partyInfoStore, times(2)).getPartyInfo();
verify(configService).featureToggles();
verify(configService).isDisablePeerDiscovery();
}

@Test
Expand Down