Skip to content

Commit

Permalink
fix: key validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Dogtiti committed May 3, 2023
1 parent 1563665 commit 253d655
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const SettingsDialog: React.FC<{
};

const keyIsValid = (key: string | undefined) => {
const pattern = /^sk-[a-zA-Z0-9]{48}$/;
const pattern = /^(sk-[a-zA-Z0-9]{48}|[a-fA-F0-9]{32})$/;
return key && pattern.test(key);
};

Expand Down

0 comments on commit 253d655

Please sign in to comment.