Skip to content
Snippets Groups Projects
Commit 84be614d authored by michael.minelli's avatar michael.minelli
Browse files

HttpManager => Fix exercice secret header name

parent fd49131b
No related branches found
No related tags found
No related merge requests found
Pipeline #27168 failed
...@@ -530,7 +530,7 @@ components: ...@@ -530,7 +530,7 @@ components:
ExerciseChecker_Secret: ExerciseChecker_Secret:
type: apiKey type: apiKey
in: header in: header
name: ExerciseSecret name: exercisesecret
parameters: parameters:
gitlabProjectIdOrNamespace: gitlabProjectIdOrNamespace:
name: gitlabProjectIdOrNamespace name: gitlabProjectIdOrNamespace
......
{ {
"name" : "dojo_backend_api", "name" : "dojo_backend_api",
"description" : "Backend API of the Dojo project", "description" : "Backend API of the Dojo project",
"version" : "3.1.0", "version" : "3.1.1",
"license" : "AGPLv3", "license" : "AGPLv3",
"author" : "Michaël Minelli <dojo@minelli.me>", "author" : "Michaël Minelli <dojo@minelli.me>",
"main" : "dist/src/app.js", "main" : "dist/src/app.js",
......
...@@ -31,7 +31,7 @@ class SecurityMiddleware { ...@@ -31,7 +31,7 @@ class SecurityMiddleware {
isAllowed = isAllowed || (req.boundParams.assignment?.published ?? false); isAllowed = isAllowed || (req.boundParams.assignment?.published ?? false);
break; break;
case SecurityCheckType.EXERCISE_SECRET: case SecurityCheckType.EXERCISE_SECRET:
isAllowed = isAllowed || (req.headers.ExerciseSecret as string | undefined) === req.boundParams.exercise!.secret; isAllowed = isAllowed || (req.headers.exercisesecret as string | undefined) === req.boundParams.exercise!.secret;
break; break;
default: default:
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment