Merge branch 'plankanban:master' into master

pull/561/head
NavyStack 2 years ago committed by GitHub
commit a67b6767bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ jobs:
done done
- name: Run chart-releaser for stable - name: Run chart-releaser for stable
uses: helm/chart-releaser-action@v1.5.0 uses: helm/chart-releaser-action@v1.6.0
with: with:
charts_dir: charts charts_dir: charts
mark_as_latest: false mark_as_latest: false

@ -1,5 +1,5 @@
# Planka # Planka
#### Elegant open source project tracking #### Elegant open source project tracking.
![David (path)](https://img.shields.io/github/package-json/v/plankanban/planka) ![Docker Pulls](https://img.shields.io/docker/pulls/meltyshev/planka) ![GitHub](https://img.shields.io/github/license/plankanban/planka) ![David (path)](https://img.shields.io/github/package-json/v/plankanban/planka) ![Docker Pulls](https://img.shields.io/docker/pulls/meltyshev/planka) ![GitHub](https://img.shields.io/github/license/plankanban/planka)
@ -20,9 +20,7 @@
## How to deploy Planka ## How to deploy Planka
There are many ways to install Planka There are many ways to install Planka, [check them out](https://docs.planka.cloud/docs/intro).
[Check them out](https://docs.planka.cloud/docs/intro)
For configuration, please see the [configuration section](https://docs.planka.cloud/docs/category/configuration). For configuration, please see the [configuration section](https://docs.planka.cloud/docs/category/configuration).

@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.11 version: 0.1.12
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.15.0" appVersion: "1.15.1"
dependencies: dependencies:
- alias: postgresql - alias: postgresql

@ -1 +1 @@
REACT_APP_VERSION=1.15.0 REACT_APP_VERSION=1.15.1

@ -14,7 +14,25 @@ export function* handleSocketReconnect() {
yield put(actions.handleSocketReconnect.fetchCore(currentUserId, boardId)); yield put(actions.handleSocketReconnect.fetchCore(currentUserId, boardId));
const { let user;
let board;
let users;
let projects;
let projectManagers;
let boards;
let boardMemberships;
let labels;
let lists;
let cards;
let cardMemberships;
let cardLabels;
let tasks;
let attachments;
let activities;
let notifications;
try {
({
user, user,
board, board,
users, users,
@ -31,7 +49,10 @@ export function* handleSocketReconnect() {
attachments, attachments,
activities, activities,
notifications, notifications,
} = yield call(requests.fetchCore); // TODO: handle error } = yield call(requests.fetchCore));
} catch (error) {
return;
}
yield put( yield put(
actions.handleSocketReconnect( actions.handleSocketReconnect(

@ -32,15 +32,29 @@ export function* authenticate(data) {
export function* authenticateUsingOidc() { export function* authenticateUsingOidc() {
const oidcConfig = yield select(selectors.selectOidcConfig); const oidcConfig = yield select(selectors.selectOidcConfig);
const state = nanoid();
window.sessionStorage.setItem('oidc-state', state);
const nonce = nanoid(); const nonce = nanoid();
window.sessionStorage.setItem('oidc-nonce', nonce); window.sessionStorage.setItem('oidc-nonce', nonce);
window.location.href = `${oidcConfig.authorizationUrl}&nonce=${encodeURIComponent(nonce)}`;
let redirectUrl = `${oidcConfig.authorizationUrl}`;
redirectUrl += `&state=${encodeURIComponent(state)}`;
redirectUrl += `&nonce=${encodeURIComponent(nonce)}`;
window.location.href = redirectUrl;
} }
export function* authenticateUsingOidcCallback() { export function* authenticateUsingOidcCallback() {
// https://github.com/plankanban/planka/issues/511#issuecomment-1771385639 // https://github.com/plankanban/planka/issues/511#issuecomment-1771385639
const params = new URLSearchParams(window.location.hash.substring(1) || window.location.search); const params = new URLSearchParams(window.location.hash.substring(1) || window.location.search);
const state = window.sessionStorage.getItem('oidc-state');
window.sessionStorage.removeItem('oidc-state');
const nonce = window.sessionStorage.getItem('oidc-nonce');
window.sessionStorage.removeItem('oidc-nonce');
yield put(replace(Paths.LOGIN)); yield put(replace(Paths.LOGIN));
if (params.get('error') !== null) { if (params.get('error') !== null) {
@ -54,27 +68,32 @@ export function* authenticateUsingOidcCallback() {
return; return;
} }
const nonce = window.sessionStorage.getItem('oidc-nonce'); const code = params.get('code');
if (nonce === null) { if (code === null) {
yield put(
actions.authenticateUsingOidc.failure(new Error('Invalid OIDC response: no code parameter')),
);
return;
}
if (params.get('state') !== state) {
yield put( yield put(
actions.authenticateUsingOidc.failure( actions.authenticateUsingOidc.failure(
new Error('Unable to process OIDC response: no nonce issued'), new Error('Unable to process OIDC response: state mismatch'),
), ),
); );
return; return;
} }
const code = params.get('code'); if (nonce === null) {
if (code === null) {
yield put( yield put(
actions.authenticateUsingOidc.failure(new Error('Invalid OIDC response: no code parameter')), actions.authenticateUsingOidc.failure(
new Error('Unable to process OIDC response: no nonce issued'),
),
); );
return; return;
} }
window.sessionStorage.removeItem('oidc-nonce');
if (code !== null) {
let accessToken; let accessToken;
try { try {
({ item: accessToken } = yield call(api.exchangeForAccessTokenUsingOidc, { ({ item: accessToken } = yield call(api.exchangeForAccessTokenUsingOidc, {
@ -89,7 +108,6 @@ export function* authenticateUsingOidcCallback() {
yield call(setAccessToken, accessToken); yield call(setAccessToken, accessToken);
yield put(actions.authenticateUsingOidc.success(accessToken)); yield put(actions.authenticateUsingOidc.success(accessToken));
} }
}
export function* clearAuthenticateError() { export function* clearAuthenticateError() {
yield put(actions.clearAuthenticateError()); yield put(actions.clearAuthenticateError());

4
package-lock.json generated

@ -1,12 +1,12 @@
{ {
"name": "planka", "name": "planka",
"version": "1.15.0", "version": "1.15.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "planka", "name": "planka",
"version": "1.15.0", "version": "1.15.1",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "planka", "name": "planka",
"version": "1.15.0", "version": "1.15.1",
"private": true, "private": true,
"homepage": "https://plankanban.github.io/planka", "homepage": "https://plankanban.github.io/planka",
"repository": { "repository": {

@ -24,8 +24,13 @@ module.exports = {
try { try {
const tokenSet = await client.callback( const tokenSet = await client.callback(
sails.config.custom.oidcRedirectUri, sails.config.custom.oidcRedirectUri,
{ code: inputs.code }, {
{ nonce: inputs.nonce }, iss: sails.config.custom.oidcIssuer,
code: inputs.code,
},
{
nonce: inputs.nonce,
},
); );
userInfo = await client.userinfo(tokenSet); userInfo = await client.userinfo(tokenSet);
} catch (e) { } catch (e) {

Loading…
Cancel
Save