We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4fda82 commit fb42f05Copy full SHA for fb42f05
plugins/brandfetch/steps/get-brand.ts
@@ -113,7 +113,10 @@ async function stepHandler(
113
const identifierType = input.identifierType || "domain";
114
115
if (identifierType === "domain") {
116
- if (!identifier.includes(".")) {
+ // Validate domain format: must have at least one character before and after the dot, no spaces, no leading/trailing dot
117
+ if (
118
+ !/^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]?(\.[a-zA-Z]{2,})+$/.test(identifier)
119
+ ) {
120
return {
121
success: false,
122
error: "Invalid domain format. Expected format: example.com",
0 commit comments