Skip to content

Commit

Permalink
fix: multi password validation in generate api
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 authored Apr 4, 2023
1 parent fd78359 commit 114f3e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/api/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const post: APIRoute = async(context) => {
},
}), { status: 400 })
}
if (sitePassword && (sitePassword !== pass || !passList.includes(pass))) {
if (sitePassword && !(sitePassword === pass || passList.includes(pass))) {
return new Response(JSON.stringify({
error: {
message: 'Invalid password.',
Expand Down

0 comments on commit 114f3e2

Please sign in to comment.