Cloud-CV / Cloud-CV/EvalAI

Check challenge phase is corresponding to challenge in update submission API

Open
#4,229 4 comments 0 reactions 0 assignees View on GitHub
bug easy_to_fix GSoC-2024 minor issue
Dominant language
Python
Stars
2k
Forks
984
Avg merge
2h 54m
Merged PRs (30d)
14

Description

Here, we do check for whether the host is accessing the challenge: https://github.com/Cloud-CV/EvalAI/blob/master/apps/jobs/views.py#L1117-L1121
```
if not is_user_a_staff(request.user) and not is_user_a_host_of_challenge(request.user, challenge_pk):
response_data = {
"error": "Sorry, you are not authorized to make this request!"
}
return Response(response_data, status=status.HTTP_400_BAD_REQUEST)

```

But, we don't verify whether the other details (challenge phase) are corresponding to that challenge PK:
https://github.com/Cloud-CV/EvalAI/blob/8bf1c3dca1f753bcb59dbe12b1f340383755eb60/apps/jobs/views.py#L1124
```
challenge_phase_pk = request.data.get("challenge_phase")
```

We need to fix this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.