From fa5d3fed2405121af874b564f81c16a6f12138dd Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 28 Feb 2024 11:07:01 +0100 Subject: [PATCH] minor fix with quit password change in Exam --- .../webservice/weblayer/api/ExamAdministrationController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAdministrationController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAdministrationController.java index 75df0c6f..9cbb5076 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAdministrationController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAdministrationController.java @@ -707,6 +707,9 @@ public class ExamAdministrationController extends EntityController { examSessionService.hasActiveSEBClientConnections(exam.id)) { final Exam oldExam = this.examDAO.byPK(exam.id).getOrThrow(); final CharSequence pwd = cryptor.decrypt(oldExam.quitPassword).getOr(oldExam.quitPassword); + if (StringUtils.isBlank(pwd) && StringUtils.isBlank(exam.quitPassword)) { + return exam; + } if (!Objects.equals(pwd, exam.quitPassword)) { throw new APIMessageException(APIMessage.fieldValidationError( new FieldError(