Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 3fc1e48

Browse files
David Favrettodarrenj
authored andcommitted
Add validation for Skill manifest id special characters (#1333)
1 parent 86617ff commit 3fc1e48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/typescript/botskills/src/functionality/connectSkill.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ function validateManifestSchema(skillManifest: ISkillManifest): void {
5151
}
5252
if (!skillManifest.id) {
5353
logger.error(`Missing property 'id' of the manifest`);
54+
} else if (skillManifest.id.match(/^\d|[^\w]/g) !== null) {
55+
// tslint:disable-next-line:max-line-length
56+
logger.error(`The 'id' of the manifest contains some characters not allowed. Make sure the 'id' contains only letters, numbers and underscores, but doesn't start with number.`);
5457
}
5558
if (!skillManifest.endpoint) {
5659
logger.error(`Missing property 'endpoint' of the manifest`);

0 commit comments

Comments
 (0)