forked from Groundpolis/Groundpolis
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CI to pull request * Node 16.20.2 * Fix: Apply Streaming on Unrenote Fix: Apply Streaming on Unrenote Fix: Apply Streaming on Unrenote Fix: Apply Streaming on Unrenote Fix: Apply Streaming on Unrenote * fix polls update localonly * noteActivity null check * Change deliver retryable statusCode * Fix: users/show response wrong users * Fix: admin/annoucements ・画像URLを空にできるように ・追加してすぐ更新しても増殖しないように ・10件よりも多く表示できるように * as:Public * Fix: user list timeline * Fix: Blocked Host not to generate query if not exist * Update sharp, systeminformation * Fix: HTTP signature validation Fix: HTTP signature validation Fix: http signature Fix: http signature Fix: http signature Fix: http signature * fix: Filter featured collection * Fix: also send delete activity of cascaded notes to stream * feat: リモートからユーザー削除が飛んできたら削除するように Delete Actor * Fix Announce/Delete AP deliver * Fix: API admin permission * Fix: Renote pure renote * Renote Visibility Check * 2022.07.03-milkey-2.8
- Loading branch information
Showing
32 changed files
with
361 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Docker Image CI | ||
|
||
on: [push] | ||
on: [push, pull_request, release] | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Node.js CI | ||
on: [push] | ||
on: [push, pull_request, release] | ||
|
||
jobs: | ||
build_and_test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.19.1 | ||
v16.20.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "groundpolis-milkey", | ||
"version": "2022.07.03-milkey-2.7", | ||
"version": "2022.07.03-milkey-2.8", | ||
"private": true, | ||
"author": "Xeltica <[email protected]> , Minemu <[email protected]> , Azuki⪥ <[email protected]> , Remito <[email protected]> , atsu1125 <[email protected]>", | ||
"contributors": [ | ||
|
@@ -54,6 +54,7 @@ | |
"@koa/cors": "3.1.0", | ||
"@koa/multer": "3.0.0", | ||
"@koa/router": "9.0.1", | ||
"@peertube/http-signature": "1.7.0", | ||
"@sentry/browser": "7.5.1", | ||
"@sentry/tracing": "5.29.2", | ||
"@sinonjs/fake-timers": "10.0.0", | ||
|
@@ -228,13 +229,13 @@ | |
"sass": "1.49.9", | ||
"sass-loader": "13.2.0", | ||
"seedrandom": "3.0.5", | ||
"sharp": "0.31.1", | ||
"sharp": "0.32.6", | ||
"speakeasy": "2.0.0", | ||
"stringz": "2.1.0", | ||
"style-loader": "3.3.1", | ||
"summaly": "2.7.0", | ||
"syslog-pro": "1.0.0", | ||
"systeminformation": "5.12.6", | ||
"systeminformation": "5.21.7", | ||
"syuilo-password-strength": "0.0.1", | ||
"terser-webpack-plugin": "4.2.3", | ||
"textarea-caret": "3.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IParsedSignature } from '@peertube/http-signature'; | ||
import { verify } from 'crypto'; | ||
import { createHash } from 'crypto'; | ||
import { toSingle } from '../../prelude/array'; | ||
|
||
export function verifySignature(sig: IParsedSignature, key: UserPublickey): boolean { | ||
if (!['hs2019', 'rsa-sha256'].includes(sig.algorithm.toLowerCase())) return false; | ||
try { | ||
return verify('rsa-sha256', Buffer.from(sig.signingString, 'utf8'), key.keyPem, Buffer.from(sig.params.signature, 'base64')); | ||
} | ||
catch { | ||
// Algo not supported | ||
return false; | ||
} | ||
} | ||
|
||
export function verifyDigest(body: string, digest: string | string[] | undefined): boolean { | ||
digest = toSingle(digest); | ||
if (body == null || digest == null || !digest.toLowerCase().startsWith('sha-256=')) | ||
return false; | ||
|
||
return createHash('sha256').update(body).digest('base64') === digest.substring(8); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { apLogger } from '../../logger'; | ||
import { createDeleteAccountJob } from '../../../../queue'; | ||
import { IRemoteUser } from '../../../../models/entities/user'; | ||
import { Users } from '../../../../models/index'; | ||
|
||
const logger = apLogger; | ||
|
||
export async function deleteActor(actor: IRemoteUser, uri: string): Promise<string> { | ||
logger.info(`Deleting the Actor: ${uri}`); | ||
|
||
if (actor.uri !== uri) { | ||
return `skip: delete actor ${actor.uri} !== ${uri}`; | ||
} | ||
|
||
if (actor.isDeleted) { | ||
logger.info(`skip: already deleted`); | ||
} | ||
|
||
const job = await createDeleteAccountJob(actor); | ||
|
||
await Users.update(actor.id, { | ||
isDeleted: true, | ||
}); | ||
|
||
return `ok: queued ${job.name} ${job.id}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import config from '../../../config'; | ||
import { ILocalUser, User } from '../../../models/entities/user'; | ||
|
||
export default (object: any, user: ILocalUser | User) => ({ | ||
type: 'Undo', | ||
actor: `${config.url}/users/${user.id}`, | ||
object | ||
}); | ||
export default (object: any, user: ILocalUser | User) => { | ||
if (object == null) return null; | ||
|
||
return { | ||
type: 'Undo', | ||
actor: `${config.url}/users/${user.id}`, | ||
object | ||
}; | ||
}; |
Oops, something went wrong.