1
0
Fork 1
mirror of https://example.com synced 2024-11-22 06:16:38 +09:00

fix (backend): reject anonymous objects

This commit is contained in:
Laura Hausmann 2024-03-27 23:01:51 +09:00 committed by naskya
parent 0e7ea7edc2
commit 3e054573da
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -133,7 +133,10 @@ export default class Resolver {
throw new Error("invalid response");
}
if (object.id == null) return object;
if (object.id == null) {
throw new Error("Object has no ID");
}
if (finalUrl === object.id) return object;
if (new URL(finalUrl).host !== new URL(object.id).host) {