Fix pleroma follow
This commit is contained in:
parent
c0e71e849a
commit
c28bcdd10a
3 changed files with 4 additions and 3 deletions
|
@ -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>)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue