forked from FoundKeyGang/FoundKey
validate that note attributed to is not local
This commit is contained in:
parent
cc342f1443
commit
c9df2fd060
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ export function validateNote(object: IObject): Error | null {
|
|||
if (attributedToHost !== expectHost) {
|
||||
return new Error(`invalid Note: attributedTo has different host. expected: ${expectHost}, actual: ${attributedToHost}`);
|
||||
}
|
||||
if (attributedToHost === config.hostname) {
|
||||
return new Error('invalid Note: by local author');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue