forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
バグがある(かつすぐに修正できそうにない) & まだレビュー途中で意図せずマージされたため
- Loading branch information
Showing
52 changed files
with
690 additions
and
1,098 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
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
39 changes: 0 additions & 39 deletions
39
packages/backend/migration/1708980134301-APMultipleKeys.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/backend/migration/1709242519122-HttpSignImplLv.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/backend/migration/1709269211718-APMultipleKeysFix1.js
This file was deleted.
Oops, something went wrong.
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,82 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and misskey-project | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
declare module '@peertube/http-signature' { | ||
import type { IncomingMessage, ClientRequest } from 'node:http'; | ||
|
||
interface ISignature { | ||
keyId: string; | ||
algorithm: string; | ||
headers: string[]; | ||
signature: string; | ||
} | ||
|
||
interface IOptions { | ||
headers?: string[]; | ||
algorithm?: string; | ||
strict?: boolean; | ||
authorizationHeaderName?: string; | ||
} | ||
|
||
interface IParseRequestOptions extends IOptions { | ||
clockSkew?: number; | ||
} | ||
|
||
interface IParsedSignature { | ||
scheme: string; | ||
params: ISignature; | ||
signingString: string; | ||
algorithm: string; | ||
keyId: string; | ||
} | ||
|
||
type RequestSignerConstructorOptions = | ||
IRequestSignerConstructorOptionsFromProperties | | ||
IRequestSignerConstructorOptionsFromFunction; | ||
|
||
interface IRequestSignerConstructorOptionsFromProperties { | ||
keyId: string; | ||
key: string | Buffer; | ||
algorithm?: string; | ||
} | ||
|
||
interface IRequestSignerConstructorOptionsFromFunction { | ||
sign?: (data: string, cb: (err: any, sig: ISignature) => void) => void; | ||
} | ||
|
||
class RequestSigner { | ||
constructor(options: RequestSignerConstructorOptions); | ||
|
||
public writeHeader(header: string, value: string): string; | ||
|
||
public writeDateHeader(): string; | ||
|
||
public writeTarget(method: string, path: string): void; | ||
|
||
public sign(cb: (err: any, authz: string) => void): void; | ||
} | ||
|
||
interface ISignRequestOptions extends IOptions { | ||
keyId: string; | ||
key: string; | ||
httpVersion?: string; | ||
} | ||
|
||
export function parse(request: IncomingMessage, options?: IParseRequestOptions): IParsedSignature; | ||
export function parseRequest(request: IncomingMessage, options?: IParseRequestOptions): IParsedSignature; | ||
|
||
export function sign(request: ClientRequest, options: ISignRequestOptions): boolean; | ||
export function signRequest(request: ClientRequest, options: ISignRequestOptions): boolean; | ||
export function createSigner(): RequestSigner; | ||
export function isSigner(obj: any): obj is RequestSigner; | ||
|
||
export function sshKeyToPEM(key: string): string; | ||
export function sshKeyFingerprint(key: string): string; | ||
export function pemToRsaSSHKey(pem: string, comment: string): string; | ||
|
||
export function verify(parsedSignature: IParsedSignature, pubkey: string | Buffer): boolean; | ||
export function verifySignature(parsedSignature: IParsedSignature, pubkey: string | Buffer): boolean; | ||
export function verifyHMAC(parsedSignature: IParsedSignature, secret: string): boolean; | ||
} |
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
Oops, something went wrong.
337b42b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromatic detects changes. Please review the changes on Chromatic.