Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
fix: ignore elders update with incorrect prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
madadam committed Jan 18, 2021
1 parent 3d8cfd5 commit dfc9c60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/section/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ impl Section {
new_elders_info: Proven<EldersInfo>,
new_key_proof: Proof,
) -> bool {
if new_elders_info.value.prefix != *self.prefix()
&& !new_elders_info.value.prefix.is_extension_of(self.prefix())
{
return false;
}

if !new_elders_info.self_verify() {
return false;
}
Expand Down

0 comments on commit dfc9c60

Please sign in to comment.