Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider f0aca56c rédigé par Benjamin Neff's avatar Benjamin Neff Validation de Dennis Schubert
Parcourir les fichiers

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
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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)
......
......@@ -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,
......
......@@ -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)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter