@@ -626,15 +626,18 @@ func TestSetNameUser(t *testing.T) {
626626}
627627` )
628628
629+ xHTTP (t , reg , "PUT" , "/" , `{"mymap":{":bar":"bar"}}` , 400 ,
630+ `Invalid map key name ":bar", must match: ^[a-z0-9][a-z0-9_.:\-]{0,62}$
631+ ` )
629632 xHTTP (t , reg , "PUT" , "/" , `{"mymap":{"@bar":"bar"}}` , 400 ,
630- `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.\-]{0,62}$
633+ `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.: \-]{0,62}$
631634` )
632635 // This is ok because "mymap" is under "ext" which is defined as "*"
633636 // and that allows ANYTHING as long as it's valid json
634637 xHTTP (t , reg , "PUT" , "/" , `{"ext":{"mymap":{"@bar":"bar"}}}` , 200 , `*` )
635638
636639 xHTTP (t , reg , "PUT" , "/dirs/d1" , `{"mymap":{"@bar":"bar"}}` , 400 ,
637- `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.\-]{0,62}$
640+ `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.: \-]{0,62}$
638641` )
639642 // This is ok because "mymap" is under "ext" which is defined as "*"
640643 // and that allows ANYTHING as long as it's valid json
@@ -643,7 +646,7 @@ func TestSetNameUser(t *testing.T) {
643646
644647 xHTTP (t , reg , "PUT" , "/dirs/d1/files/f1$details" ,
645648 `{"mymap":{"@bar":"bar"}}` , 400 ,
646- `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.\-]{0,62}$
649+ `Invalid map key name "@bar", must match: ^[a-z0-9][a-z0-9_.: \-]{0,62}$
647650` )
648651 // This is ok because "mymap" is under "ext" which is defined as "*"
649652 // and that allows ANYTHING as long as it's valid json
0 commit comments