Skip to content

Commit 4e19655

Browse files
Merge pull request #61 from gjsjohnmurray/fix-60
fix #60 no longer permit '.' character in server names
2 parents 63e4281 + 36d80cf commit 4e19655

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"/default": "default~iris"
9999
},
100100
"patternProperties": {
101-
"^[a-z0-9-._~]+$": {
101+
"^[a-z0-9-_~]+$": {
102102
"type": "object",
103103
"description": "A server definition, with properties that specify how to connect to it.",
104104
"properties": {

src/api/addServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export async function addServer(
1717
if (serverNames.filter((server) => server.name === value).length) {
1818
return "Name already exists";
1919
}
20-
if (!value.match(/^[a-z0-9-._~]+$/)) {
21-
return "Can only contain a-z, 0-9 and punctuation -._~";
20+
if (!value.match(/^[a-z0-9-_~]+$/)) {
21+
return "Can only contain a-z, 0-9 and punctuation -_~";
2222
}
2323
return null;
2424
},

0 commit comments

Comments
 (0)