]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix pleroma follow
authorChocobozzz <me@florianbigard.com>
Thu, 25 Apr 2019 13:19:53 +0000 (15:19 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 25 Apr 2019 13:20:30 +0000 (15:20 +0200)
server/lib/activitypub/crawl.ts
server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
server/middlewares/activitypub.ts

index 0ba59b47dde4c0c90e7d133ab2333f756bdaf27a..686eef04d9d0f4b77c5cdae05debe5c878320463 100644 (file)
@@ -3,8 +3,7 @@ import { doRequest } from '../../helpers/requests'
 import { logger } from '../../helpers/logger'
 import * as Bluebird from 'bluebird'
 import { ActivityPubOrderedCollection } from '../../../shared/models/activitypub'
-import { checkUrlsSameHost } from '../../helpers/activitypub'
-import { parse } from "url"
+import { parse } from 'url'
 
 type HandlerFunction<T> = (items: T[]) => (Promise<any> | Bluebird<any>)
 type CleanerFunction = (startedDate: Date) => (Promise<any> | Bluebird<any>)
index 5c25625f62befb94f77decf67939a2ea25560433..cdee1f6fd4eb2636b803788420b5b1548535c651 100644 (file)
@@ -28,7 +28,7 @@ async function buildSignedRequestOptions (payload: Payload) {
     actor = await getServerActor()
   }
 
-  const keyId = actor.getWebfingerUrl()
+  const keyId = actor.url
   return {
     algorithm: HTTP_SIGNATURE.ALGORITHM,
     authorizationHeaderName: HTTP_SIGNATURE.HEADER_NAME,
index 88cf342ee41ec94531dff3b683138397b5290a1f..b1e5b52369c115dadc556264262c1db4260c2f47 100644 (file)
@@ -74,6 +74,8 @@ async function checkHttpSignature (req: Request, res: Response) {
 
   const verified = isHTTPSignatureVerified(parsed, actor)
   if (verified !== true) {
+    logger.warn('Signature from %s is invalid', actorUrl, { parsed })
+
     res.sendStatus(403)
     return false
   }