forked from stove/dataset
60 lines
2.4 KiB
Diff
60 lines
2.4 KiB
Diff
--- peertube_plugins/node_modules/peertube-plugin-auth-openid-connect/main.js
|
|
+++ peertube_plugins/node_modules/peertube-plugin-auth-openid-connect/main.js
|
|
@@ -110,6 +110,14 @@ async function register ({
|
|
descriptionHTML: 'Will only allow login for users whose group array contains this group'
|
|
})
|
|
|
|
+ registerSetting({
|
|
+ name: 'signature-algorithm',
|
|
+ label: 'Token signature algorithm',
|
|
+ type: 'input',
|
|
+ private: true,
|
|
+ default: 'RS256'
|
|
+ })
|
|
+
|
|
const router = getRouter()
|
|
router.use('/code-cb', (req, res) => handleCb(peertubeHelpers, settingsManager, req, res))
|
|
|
|
@@ -159,7 +167,8 @@ async function loadSettingsAndCreateClient (registerExternalAuth, unregisterExte
|
|
'scope',
|
|
'discover-url',
|
|
'client-id',
|
|
- 'client-secret'
|
|
+ 'client-secret',
|
|
+ 'signature-algorithm'
|
|
])
|
|
|
|
if (!settings['discover-url']) {
|
|
@@ -188,6 +197,8 @@ async function loadSettingsAndCreateClient (registerExternalAuth, unregisterExte
|
|
} else {
|
|
clientOptions.token_endpoint_auth_method = 'none'
|
|
}
|
|
+ clientOptions.id_token_signed_response_alg = settings['signature-algorithm']
|
|
+ clientOptions.authorization_signed_response_alg = settings['signature-algorithm']
|
|
|
|
store.client = new issuer.Client(clientOptions)
|
|
|
|
--- peertube/dist/server/helpers/custom-validators/activitypub/actor.js.ori 2022-04-06 13:58:17.752681849 +0000
|
|
+++ peertube/dist/server/helpers/custom-validators/activitypub/actor.js 2022-04-06 13:58:22.268682531 +0000
|
|
@@ -43,8 +43,8 @@
|
|
function isActorPrivateKeyValid(privateKey) {
|
|
return (0, misc_1.exists)(privateKey) &&
|
|
typeof privateKey === 'string' &&
|
|
- privateKey.startsWith('-----BEGIN RSA PRIVATE KEY-----') &&
|
|
- privateKey.includes('-----END RSA PRIVATE KEY-----') &&
|
|
+ privateKey.startsWith('-----BEGIN PRIVATE KEY-----') &&
|
|
+ privateKey.includes('-----END PRIVATE KEY-----') &&
|
|
validator_1.default.isLength(privateKey, constants_1.CONSTRAINTS_FIELDS.ACTORS.PRIVATE_KEY);
|
|
}
|
|
exports.isActorPrivateKeyValid = isActorPrivateKeyValid;
|
|
--- peertube/node_modules/pem/lib/pem.js.ori 2022-04-06 13:59:36.232693763 +0000
|
|
+++ peertube/node_modules/pem/lib/pem.js 2022-04-06 13:59:48.916695687 +0000
|
|
@@ -74,7 +74,7 @@
|
|
|
|
params.push(keyBitsize)
|
|
|
|
- openssl.exec(params, 'RSA PRIVATE KEY', function (sslErr, key) {
|
|
+ openssl.exec(params, 'PRIVATE KEY', function (sslErr, key) {
|
|
function done (err) {
|
|
if (err) {
|
|
return callback(err)
|