summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/config.go2
-rw-r--r--model/config_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/model/config.go b/model/config.go
index 7105af893..be940d893 100644
--- a/model/config.go
+++ b/model/config.go
@@ -2418,7 +2418,7 @@ func (mes *MessageExportSettings) isValid(fs FileSettings) *AppError {
func (ds *DisplaySettings) isValid() *AppError {
if len(*ds.CustomUrlSchemes) != 0 {
- validProtocolPattern := regexp.MustCompile(`(?i)^\s*[a-z][a-z0-9+.-]*\s*$`)
+ validProtocolPattern := regexp.MustCompile(`(?i)^\s*[a-z][a-z0-9-]*\s*$`)
for _, scheme := range *ds.CustomUrlSchemes {
if !validProtocolPattern.MatchString(scheme) {
diff --git a/model/config_test.go b/model/config_test.go
index 5406d680d..848f4327e 100644
--- a/model/config_test.go
+++ b/model/config_test.go
@@ -466,7 +466,7 @@ func TestDisplaySettingsIsValidCustomUrlSchemes(t *testing.T) {
{
name: "containing period",
value: []string{"iris.beep"},
- valid: true,
+ valid: false, // should technically be true, but client doesn't support it
},
{
name: "containing hyphen",
@@ -476,7 +476,7 @@ func TestDisplaySettingsIsValidCustomUrlSchemes(t *testing.T) {
{
name: "containing plus",
value: []string{"coap+tcp", "coap+ws"},
- valid: true,
+ valid: false, // should technically be true, but client doesn't support it
},
{
name: "starting with number",