From cb85ae64bbe699cb5db0ffb6e5f0898b1493a6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?= <janis.daehne@informatik.uni-halle.de> Date: Thu, 3 Apr 2025 16:45:55 +0200 Subject: [PATCH] - fixed issue where leading and trailing spaces in the enter release code dialog would lead to a wrong redirect url --- .../dialogs/enterReleaseCodeDialog.tsx | 4 ++-- .../dialogs/enterReleaseCodeView.tsx | 4 ++-- src/constants.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeDialog.tsx b/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeDialog.tsx index 6107adc0..05c357ca 100644 --- a/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeDialog.tsx +++ b/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeDialog.tsx @@ -87,8 +87,8 @@ class enterReleaseCodeDialog extends React.Component<Props, any> { //we only need to take care if the exercise is only visible to the owner //if the release is hidden in overviews the link still works so this is ok try { - await this.props.accessExerciseWithCodeAsync(this.props.dialogState.releaseCode) - history.push(getDoExerciseSiteToLink(this.props.dialogState.releaseCode)) + await this.props.accessExerciseWithCodeAsync(this.props.dialogState.releaseCode.trim()) + history.push(getDoExerciseSiteToLink(this.props.dialogState.releaseCode.trim())) } catch (err) { //error message is not shown here but in accessExerciseWithCodeAsync } diff --git a/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeView.tsx b/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeView.tsx index d976e25f..29f56267 100644 --- a/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeView.tsx +++ b/src/components/sites/allAccessibleExercisesSite/dialogs/enterReleaseCodeView.tsx @@ -73,8 +73,8 @@ class EnterReleaseCodeView extends React.Component<Props, any> { if (e.key.toLowerCase() !== 'enter') return try { - await this.props.accessExerciseWithCodeAsync(this.props.dialogState.releaseCode) - history.push(getDoExerciseSiteToLink(this.props.dialogState.releaseCode)) + await this.props.accessExerciseWithCodeAsync(this.props.dialogState.releaseCode.trim()) + history.push(getDoExerciseSiteToLink(this.props.dialogState.releaseCode.trim())) } catch (err) { //error message is not shown here but in accessExerciseWithCodeAsync } diff --git a/src/constants.ts b/src/constants.ts index 62e1f313..4329751d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.20.1' +export const versionString = '2.20.2' export const supportMail = 'yapex@informatik.uni-halle.de' -- GitLab