Skip to content

Commit

Permalink
feat: add leading dot check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Mar 29, 2024
1 parent 964bae4 commit 5f54598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/measurement/schema/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const joiValidateDomainForDns = () => (value: string, helpers: CustomHelp
return value;
}

if (validator.isFQDN('example' + value, options)) {
if (value[0] === '.' && validator.isFQDN('example' + value, options)) {
return value.substring(1);
}

Expand Down

0 comments on commit 5f54598

Please sign in to comment.