Cleanup
This commit is contained in:
parent
b0fff20a02
commit
6afbb29139
|
@ -511,7 +511,7 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!this._isSignatureEqual(
|
!this._isSignatureValid(
|
||||||
activity.signature,
|
activity.signature,
|
||||||
objInfo.object.signature
|
objInfo.object.signature
|
||||||
)
|
)
|
||||||
|
@ -527,7 +527,13 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule {
|
||||||
collectionName,
|
collectionName,
|
||||||
objInfo.object,
|
objInfo.object,
|
||||||
stats,
|
stats,
|
||||||
nextObjInfo
|
() => {
|
||||||
|
if ('Note' === objInfo.object.type) {
|
||||||
|
// :TODO: delete associated message!
|
||||||
|
}
|
||||||
|
|
||||||
|
return nextObjInfo(null);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
case Collections.Actors:
|
case Collections.Actors:
|
||||||
|
@ -584,11 +590,13 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_isSignatureEqual(sigA, sigB) {
|
_isSignatureValid(request, object) {
|
||||||
|
// :TODO: We need to validate signatures here -- this is no good
|
||||||
|
// https://github.com/transmute-industries/RsaSignature2017
|
||||||
return (
|
return (
|
||||||
sigA.type === sigB.type &&
|
request.type === object.type && request.creator === object.creator
|
||||||
sigA.creator === sigB.creator &&
|
//&&
|
||||||
sigA.signatureValue === sigB.signatureValue
|
// request.signatureValue === object.signatureValue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue