Unverified Commit f0aca56c authored by Benjamin Neff's avatar Benjamin Neff Committed by Dennis Schubert
Browse files

Don't retry for PublicKeyNotFound

We only return `nil` when we know the person, but don't know the key or
the key is invalid, so it doesn't make sense to retry in this case. When
the person isn't known and can't be fetched we raise a DiscoveryError
which will be retried.

Also the errors were moved to the `Signable` module in the last release.

closes #7717
parent 602a1dcd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
## Bug fixes
* Prevent duplicate mention notifications when the post is received twice [#7721](https://github.com/diaspora/diaspora/pull/7721)
* Fixed a compatiblitiy issue with non-diaspora\* webfingers [#7718](https://github.com/diaspora/diaspora/pull/7718)
* Don't retry federation for accounts without a valid public key [#7717](https://github.com/diaspora/diaspora/pull/7717)

## Features
* Add basic html5 audio/video embedding support [#6418](https://github.com/diaspora/diaspora/pull/6418)
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ module Workers
           DiasporaFederation::Parsers::BaseParser::InvalidRootNode,
           DiasporaFederation::Entity::InvalidEntityName,
           DiasporaFederation::Entity::UnknownEntity,
           DiasporaFederation::Entities::Relayable::SignatureVerificationFailed,
           DiasporaFederation::Entities::Signable::PublicKeyNotFound,
           DiasporaFederation::Entities::Signable::SignatureVerificationFailed,
           DiasporaFederation::Entities::Participation::ParentNotLocal,
           DiasporaFederation::Federation::Receiver::InvalidSender,
           DiasporaFederation::Federation::Receiver::NotPublic,
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ describe "diaspora federation callbacks" do
      expect(key.to_s).to eq(person.serialized_public_key)
    end

    it "returns nil for an unknown person" do
    it "forwards the DiscoveryError when the person can't be fetched" do
      diaspora_id = Fabricate.sequence(:diaspora_id)
      expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id)
        .and_raise(DiasporaFederation::Discovery::DiscoveryError)