diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a37bbb9a1..cbdd58dba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,8 +183,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 jose: - specifier: ^5.10.0 - version: 5.10.0 + specifier: ^6.0.12 + version: 6.0.12 js-cookie: specifier: ^3.0.5 version: 3.0.5 @@ -3390,9 +3390,6 @@ packages: engines: {node: '>=10'} hasBin: true - jose@5.10.0: - resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} - jose@6.0.12: resolution: {integrity: sha512-T8xypXs8CpmiIi78k0E+Lk7T2zlK4zDyg+o1CZ4AkOHgDg98ogdP2BeZ61lTFKFyoEwJ9RgAgN+SdM3iPgNonQ==} @@ -8118,8 +8115,6 @@ snapshots: filelist: 1.0.4 minimatch: 3.1.2 - jose@5.10.0: {} - jose@6.0.12: {} js-cookie@3.0.5: {} diff --git a/src/node/security/OAuth2Provider.ts b/src/node/security/OAuth2Provider.ts index b4abd3249..3ef7d3a3b 100644 --- a/src/node/security/OAuth2Provider.ts +++ b/src/node/security/OAuth2Provider.ts @@ -1,14 +1,13 @@ import {ArgsExpressType} from "../types/ArgsExpressType"; import Provider, {Account, Configuration} from 'oidc-provider'; -import {generateKeyPair, exportJWK, KeyLike} from 'jose' +import {generateKeyPair, exportJWK, CryptoKey} from 'jose' import MemoryAdapter from "./OIDCAdapter"; import path from "path"; const settings = require('../utils/Settings'); import {IncomingForm} from 'formidable' -import express, {Request, Response} from 'express'; +import express from 'express'; import {format} from 'url' import {ParsedUrlQuery} from "node:querystring"; -import {Http2ServerRequest, Http2ServerResponse} from "node:http2"; import {MapArrayType} from "../types/MapType"; const configuration: Configuration = { @@ -64,14 +63,16 @@ const configuration: Configuration = { }; -export let publicKeyExported: KeyLike|null -export let privateKeyExported: KeyLike|null +export let publicKeyExported: CryptoKey|null +export let privateKeyExported: CryptoKey|null /* This function is used to initialize the OAuth2 provider */ export const expressCreateServer = async (hookName: string, args: ArgsExpressType, cb: Function) => { - const {privateKey, publicKey} = await generateKeyPair('RS256'); + const {privateKey, publicKey} = await generateKeyPair('RS256', { + extractable: true + }); const privateKeyJWK = await exportJWK(privateKey); publicKeyExported = publicKey privateKeyExported = privateKey diff --git a/src/package.json b/src/package.json index f96724207..d0cd6a89b 100644 --- a/src/package.json +++ b/src/package.json @@ -44,7 +44,7 @@ "find-root": "1.1.0", "formidable": "^3.5.4", "http-errors": "^2.0.0", - "jose": "^5.10.0", + "jose": "^6.0.12", "js-cookie": "^3.0.5", "jsdom": "^26.1.0", "jsonminify": "0.4.2", diff --git a/src/static/js/Changeset.ts b/src/static/js/Changeset.ts index 8d96e157b..bf4f1b82b 100644 --- a/src/static/js/Changeset.ts +++ b/src/static/js/Changeset.ts @@ -328,7 +328,7 @@ export const checkRep = (cs: string) => { * - `op2` is the current operation from `in2`, to apply to `op1`. Has the same consumption * and advancement semantics as `op1`. * - `opOut` is the result of applying `op2` (before consumption) to `op1` (before - * consumption). If there is no result (perhaps `op1` and `op2` cancelled each other out), + * consumption). If there is no result (perhaps `op1` and `op2` canceled each other out), * either `opOut` must be nullish or `opOut.opcode` must be the empty string. * @returns {string} the integrated changeset */