Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Apr 13, 2024
1 parent 6b7df2b commit 14739bc
Show file tree
Hide file tree
Showing 11 changed files with 1,521 additions and 1,514 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/MisskeyIO/misskey.git"
},
"packageManager": "pnpm@8.15.5",
"packageManager": "pnpm@8.15.6",
"workspaces": [
"packages/frontend",
"packages/backend",
Expand Down Expand Up @@ -56,15 +56,15 @@
"execa": "8.0.1",
"js-yaml": "4.1.0",
"postcss": "8.4.38",
"terser": "5.30.0",
"typescript": "5.4.3"
"terser": "5.30.3",
"typescript": "5.4.5"
},
"devDependencies": {
"@types/node": "20.12.2",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"@types/node": "20.12.7",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"cross-env": "7.0.3",
"cypress": "13.7.1",
"cypress": "13.7.3",
"eslint": "8.57.0",
"ncp": "2.0.0",
"start-server-and-test": "2.0.3"
Expand Down
38 changes: 19 additions & 19 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
},
"dependencies": {
"@authenio/samlify-node-xmllint": "2.0.0",
"@aws-sdk/client-s3": "3.540.0",
"@aws-sdk/lib-storage": "3.540.0",
"@aws-sdk/client-s3": "3.554.0",
"@aws-sdk/lib-storage": "3.554.0",
"@bull-board/api": "5.15.3",
"@bull-board/fastify": "5.15.3",
"@bull-board/ui": "5.15.3",
Expand All @@ -79,28 +79,28 @@
"@fastify/formbody": "7.4.0",
"@fastify/http-proxy": "9.5.0",
"@fastify/multipart": "8.2.0",
"@fastify/static": "7.0.2",
"@fastify/static": "7.0.3",
"@fastify/view": "9.0.0",
"@misskey-dev/sharp-read-bmp": "1.2.0",
"@misskey-dev/summaly": "5.1.0",
"@nestjs/common": "10.3.7",
"@nestjs/core": "10.3.7",
"@nestjs/testing": "10.3.7",
"@peertube/http-signature": "1.7.0",
"@simplewebauthn/server": "9.0.3",
"@simplewebauthn/server": "10.0.0",
"@sinonjs/fake-timers": "11.2.2",
"@smithy/node-http-handler": "2.5.0",
"@swc/cli": "0.1.65",
"@swc/core": "1.3.107",
"@twemoji/parser": "15.1.0",
"@twemoji/parser": "15.1.1",
"accepts": "1.3.8",
"ajv": "8.12.0",
"archiver": "6.0.1",
"async-mutex": "0.4.1",
"bcryptjs": "2.4.3",
"blurhash": "2.0.5",
"body-parser": "1.20.2",
"bullmq": "5.4.6",
"bullmq": "5.7.1",
"cacheable-lookup": "7.0.0",
"cbor": "9.0.2",
"chalk": "5.3.0",
Expand All @@ -112,7 +112,7 @@
"date-fns": "3.6.0",
"deep-email-validator": "0.1.21",
"fastify": "4.26.2",
"fastify-http-errors-enhanced": "5.0.3",
"fastify-http-errors-enhanced": "5.0.4",
"fastify-raw-body": "4.3.0",
"feed": "4.2.2",
"file-type": "19.0.0",
Expand All @@ -127,7 +127,7 @@
"ip-cidr": "3.1.0",
"ipaddr.js": "2.1.0",
"is-svg": "5.0.0",
"jose": "5.2.3",
"jose": "5.2.4",
"js-yaml": "4.1.0",
"jsdom": "23.2.0",
"json5": "2.2.3",
Expand All @@ -140,7 +140,7 @@
"misskey-js": "workspace:*",
"misskey-reversi": "workspace:*",
"ms": "3.0.0-canary.1",
"nanoid": "5.0.6",
"nanoid": "5.0.7",
"nested-property": "4.0.0",
"node-fetch": "3.3.2",
"node-forge": "1.3.1",
Expand All @@ -150,10 +150,10 @@
"oauth2orize": "1.12.0",
"oauth2orize-pkce": "0.1.2",
"os-utils": "0.0.14",
"otpauth": "9.2.2",
"otpauth": "9.2.3",
"parse5": "7.1.2",
"pg": "8.11.3",
"pino": "8.19.0",
"pg": "8.11.5",
"pino": "8.20.0",
"pino-pretty": "11.0.0",
"pkce-challenge": "4.1.0",
"probe-image-size": "7.2.3",
Expand All @@ -177,13 +177,13 @@
"slacc": "0.0.10",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"systeminformation": "5.22.6",
"systeminformation": "5.22.7",
"tinycolor2": "1.6.0",
"tmp": "0.2.3",
"tsc-alias": "1.8.8",
"tsconfig-paths": "4.2.0",
"typeorm": "0.3.20",
"typescript": "5.4.3",
"typescript": "5.4.5",
"ulid": "2.3.0",
"vary": "1.1.2",
"web-push": "3.6.7",
Expand All @@ -195,7 +195,7 @@
"@jest/globals": "29.7.0",
"@misskey-dev/eslint-plugin": "1.0.0",
"@nestjs/platform-express": "10.3.7",
"@simplewebauthn/types": "9.0.1",
"@simplewebauthn/types": "10.0.0",
"@swc/jest": "0.2.36",
"@types/accepts": "1.3.7",
"@types/archiver": "6.0.2",
Expand All @@ -213,13 +213,13 @@
"@types/jsrsasign": "10.5.13",
"@types/mime-types": "2.1.4",
"@types/ms": "0.7.34",
"@types/node": "20.12.2",
"@types/node": "20.12.7",
"@types/node-forge": "1.3.11",
"@types/nodemailer": "6.4.14",
"@types/oauth": "0.9.4",
"@types/oauth2orize": "1.11.5",
"@types/oauth2orize-pkce": "0.1.2",
"@types/pg": "8.11.4",
"@types/pg": "8.11.5",
"@types/pug": "2.0.10",
"@types/punycode": "2.1.4",
"@types/qrcode": "1.5.5",
Expand All @@ -235,8 +235,8 @@
"@types/vary": "1.1.3",
"@types/web-push": "3.6.3",
"@types/ws": "8.5.10",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"aws-sdk-client-mock": "4.0.0",
"cross-env": "7.0.3",
"eslint": "8.57.0",
Expand Down
25 changes: 14 additions & 11 deletions packages/backend/src/core/WebAuthnService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import {
verifyAuthenticationResponse,
verifyRegistrationResponse,
} from '@simplewebauthn/server';
import { AttestationFormat, isoCBOR } from '@simplewebauthn/server/helpers';
import {
AttestationFormat,
isoCBOR,
isoUint8Array,
} from '@simplewebauthn/server/helpers';
import { DI } from '@/di-symbols.js';
import type { UserSecurityKeysRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
Expand All @@ -26,7 +30,6 @@ import type {
AuthenticatorTransportFuture,
CredentialDeviceType,
PublicKeyCredentialCreationOptionsJSON,
PublicKeyCredentialDescriptorFuture,
PublicKeyCredentialRequestOptionsJSON,
RegistrationResponseJSON,
} from '@simplewebauthn/types';
Expand Down Expand Up @@ -72,13 +75,12 @@ export class WebAuthnService {
const registrationOptions = await generateRegistrationOptions({
rpName: relyingParty.rpName,
rpID: relyingParty.rpId,
userID: userId,
userID: isoUint8Array.fromUTF8String(userId),
userName: userName,
userDisplayName: userDisplayName,
attestationType: 'indirect',
excludeCredentials: keys.map(key => (<PublicKeyCredentialDescriptorFuture>{
id: Buffer.from(key.id, 'base64url'),
type: 'public-key',
excludeCredentials: keys.map(key => (<{ id: string; transports?: AuthenticatorTransportFuture[]; }>{
id: key.id,
transports: key.transports ?? undefined,
})),
authenticatorSelection: {
Expand All @@ -94,7 +96,7 @@ export class WebAuthnService {

@bindThis
public async verifyRegistration(userId: MiUser['id'], response: RegistrationResponseJSON): Promise<{
credentialID: Uint8Array;
credentialID: string;
credentialPublicKey: Uint8Array;
attestationObject: Uint8Array;
fmt: AttestationFormat;
Expand Down Expand Up @@ -151,6 +153,7 @@ export class WebAuthnService {

@bindThis
public async initiateAuthentication(userId: MiUser['id']): Promise<PublicKeyCredentialRequestOptionsJSON> {
const relyingParty = await this.getRelyingParty();
const keys = await this.userSecurityKeysRepository.findBy({
userId: userId,
});
Expand All @@ -160,9 +163,9 @@ export class WebAuthnService {
}

const authenticationOptions = await generateAuthenticationOptions({
allowCredentials: keys.map(key => (<PublicKeyCredentialDescriptorFuture>{
id: Buffer.from(key.id, 'base64url'),
type: 'public-key',
rpID: relyingParty.rpId,
allowCredentials: keys.map(key => (<{ id: string; transports?: AuthenticatorTransportFuture[]; }>{
id: key.id,
transports: key.transports ?? undefined,
})),
userVerification: 'preferred',
Expand Down Expand Up @@ -226,7 +229,7 @@ export class WebAuthnService {
expectedOrigin: relyingParty.origin,
expectedRPID: relyingParty.rpId,
authenticator: {
credentialID: Buffer.from(key.id, 'base64url'),
credentialID: key.id,
credentialPublicKey: Buffer.from(key.publicKey, 'base64url'),
counter: key.counter,
transports: key.transports ? key.transports as AuthenticatorTransportFuture[] : undefined,
Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/server/api/endpoints/i/2fa/key-done.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {

const keyInfo = await this.webAuthnService.verifyRegistration(me.id, ps.credential);

const credentialId = Buffer.from(keyInfo.credentialID).toString('base64url');
await this.userSecurityKeysRepository.insert({
id: credentialId,
id: keyInfo.credentialID,
userId: me.id,
name: ps.name,
publicKey: Buffer.from(keyInfo.credentialPublicKey).toString('base64url'),
Expand All @@ -116,7 +115,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
}));

return {
id: credentialId,
id: keyInfo.credentialID,
name: ps.name,
};
});
Expand Down
66 changes: 33 additions & 33 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@rollup/plugin-typescript": "11.1.6",
"@rollup/pluginutils": "5.1.0",
"@syuilo/aiscript": "0.17.0",
"@tabler/icons-webfont": "3.1.0",
"@twemoji/parser": "15.1.0",
"@tabler/icons-webfont": "3.2.0",
"@twemoji/parser": "15.1.1",
"@vitejs/plugin-vue": "5.0.4",
"@vue/compiler-sfc": "3.4.15",
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.2",
Expand Down Expand Up @@ -59,67 +59,67 @@
"misskey-reversi": "workspace:*",
"photoswipe": "5.4.3",
"punycode": "2.3.1",
"rollup": "4.13.2",
"rollup": "4.14.2",
"sanitize-html": "2.13.0",
"sass": "1.72.0",
"shiki": "1.2.1",
"sass": "1.75.0",
"shiki": "1.3.0",
"strict-event-emitter-types": "2.0.0",
"textarea-caret": "3.1.0",
"three": "0.163.0",
"throttle-debounce": "5.0.0",
"tinycolor2": "1.6.0",
"tsc-alias": "1.8.8",
"tsconfig-paths": "4.2.0",
"typescript": "5.4.3",
"typescript": "5.4.5",
"uuid": "9.0.1",
"v-code-diff": "1.11.0",
"vite": "5.2.7",
"vite": "5.2.8",
"vue": "3.4.15",
"vuedraggable": "next"
},
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@misskey-dev/summaly": "5.1.0",
"@storybook/addon-actions": "8.0.5",
"@storybook/addon-essentials": "8.0.5",
"@storybook/addon-interactions": "8.0.5",
"@storybook/addon-links": "8.0.5",
"@storybook/addon-mdx-gfm": "8.0.5",
"@storybook/addon-storysource": "8.0.5",
"@storybook/blocks": "8.0.5",
"@storybook/components": "8.0.5",
"@storybook/core-events": "8.0.5",
"@storybook/manager-api": "8.0.5",
"@storybook/preview-api": "8.0.5",
"@storybook/react": "8.0.5",
"@storybook/react-vite": "8.0.5",
"@storybook/test": "8.0.5",
"@storybook/theming": "8.0.5",
"@storybook/types": "8.0.5",
"@storybook/vue3": "8.0.5",
"@storybook/vue3-vite": "8.0.5",
"@storybook/addon-actions": "8.0.8",
"@storybook/addon-essentials": "8.0.8",
"@storybook/addon-interactions": "8.0.8",
"@storybook/addon-links": "8.0.8",
"@storybook/addon-mdx-gfm": "8.0.8",
"@storybook/addon-storysource": "8.0.8",
"@storybook/blocks": "8.0.8",
"@storybook/components": "8.0.8",
"@storybook/core-events": "8.0.8",
"@storybook/manager-api": "8.0.8",
"@storybook/preview-api": "8.0.8",
"@storybook/react": "8.0.8",
"@storybook/react-vite": "8.0.8",
"@storybook/test": "8.0.8",
"@storybook/theming": "8.0.8",
"@storybook/types": "8.0.8",
"@storybook/vue3": "8.0.8",
"@storybook/vue3-vite": "8.0.8",
"@testing-library/vue": "8.0.3",
"@types/escape-regexp": "0.0.3",
"@types/estree": "1.0.5",
"@types/matter-js": "0.19.6",
"@types/micromatch": "4.0.6",
"@types/node": "20.12.2",
"@types/node": "20.12.7",
"@types/punycode": "2.1.4",
"@types/sanitize-html": "2.11.0",
"@types/throttle-debounce": "5.0.2",
"@types/tinycolor2": "1.4.6",
"@types/uuid": "9.0.8",
"@types/ws": "8.5.10",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"@vitest/coverage-v8": "0.34.6",
"@vue/runtime-core": "3.4.15",
"acorn": "8.11.3",
"cross-env": "7.0.3",
"cypress": "13.7.1",
"cypress": "13.7.3",
"eslint": "8.57.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-vue": "9.24.0",
"eslint-plugin-vue": "9.24.1",
"fast-glob": "3.3.2",
"happy-dom": "13.6.2",
"intersection-observer": "0.12.2",
Expand All @@ -131,13 +131,13 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"start-server-and-test": "2.0.3",
"storybook": "8.0.5",
"storybook": "8.0.8",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"vite-plugin-turbosnap": "1.0.3",
"vitest": "0.34.6",
"vitest-fetch-mock": "0.2.2",
"vue-component-type-helpers": "2.0.7",
"vue-component-type-helpers": "2.0.13",
"vue-eslint-parser": "9.4.2",
"vue-tsc": "2.0.7"
"vue-tsc": "2.0.13"
}
}
Loading

0 comments on commit 14739bc

Please sign in to comment.