Skip to content

Commit

Permalink
api: update out of range check for meeting name and meeting id
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippKilian committed May 29, 2024
1 parent c2e52f0 commit 4cbceab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Fixes:
- add possibility to use the same meeting ID for two different secrets.
- send an error if meeting id is too long (2 < id_length < 100 chars)
- return an error message if meeting id is out of range (2 <= id_length <= 100 chars)


## 3.2.2 - 2024-05-23
Expand Down
4 changes: 2 additions & 2 deletions b3lb/rest/classes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ async def create(self) -> HttpResponse:
if not self.meeting_id:
return HttpResponse(cst.RETURN_STRING_MISSING_MEETING_ID, content_type=cst.CONTENT_TYPE)

if not 2 <= len(self.meeting_id) < cst.MEETING_ID_LENGTH:
if not 2 <= len(self.meeting_id) <= cst.MEETING_ID_LENGTH:
return HttpResponse(cst.RETURN_STRING_MISSING_MEETING_ID_TO_LONG, content_type=cst.CONTENT_TYPE)

if not 2 <= len(self.meeting_name) < cst.MEETING_NAME_LENGTH:
if not 2 <= len(self.meeting_name) <= cst.MEETING_NAME_LENGTH:
return HttpResponse(cst.RETURN_STRING_WRONG_MEETING_NAME_LENGTH, content_type=cst.CONTENT_TYPE)

if not await self.is_meeting():
Expand Down

0 comments on commit 4cbceab

Please sign in to comment.