Skip to content

Commit

Permalink
Fix board path check
Browse files Browse the repository at this point in the history
  • Loading branch information
oakes committed Jun 20, 2022
1 parent a7183d1 commit 9dbb8cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wavecorepkg/server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ proc ansiwavePost(data: ThreadData, request: Request, headers: var string, body:
let board = cmds["/board"]
if board != paths.encode(paths.decode(board)):
raise newException(BadRequestException, "Invalid value in /board")
if not os.dirExists(data.details.staticFileDir / paths.boardsDir / board / paths.boardDir):
if not os.dirExists(data.details.staticFileDir / paths.boardsDir / board):
raise newException(BadRequestException, "Board does not exist")

# check the sig
Expand Down

0 comments on commit 9dbb8cd

Please sign in to comment.