ActivityPub-federated video streaming platform using P2P directly in your web browser
Strict actor url comparison
Chocobozzze26dc0cdbda1
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.tsindex 63975021c9..fb5558ff6b 100644--- a/server/lib/activitypub/actor.ts+++ b/server/lib/activitypub/actor.ts@@ -403,7 +403,7 @@ function saveActorAndServerAndModelIfNotExist (// Try to fix non HTTPS accounts of remote instances that fixed their URL afterwardsif (created !== true && actorCreated.url !== actor.url) {// Only fix http://example.com/account/djidane to https://example.com/account/djidane- if (actorCreated.url.replace('http://', '') !== actor.url.replace('https://', '')) {+ if (actorCreated.url.replace(/^http:\/\//, '') !== actor.url.replace(/^https:\/\//, '')) {throw new Error(`Actor from DB with URL ${actorCreated.url} does not correspond to actor ${actor.url}`)}diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.tsindex a64588ed74..54e4010e9a 100644--- a/server/tests/api/live/live-permanent.ts+++ b/server/tests/api/live/live-permanent.ts@@ -4,7 +4,6 @@ import 'mocha'import * as chai from 'chai'import { LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState } from '@shared/models'import {- checkLiveCleanup,cleanupTests,createLive,doubleFollow,