File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,11 @@ func PostSambaConnectionsCreate(c *gin.Context) {
131
131
return
132
132
}
133
133
134
- if ok , _ := regexp .MatchString ("^[a-zA-Z0-9 ]{4,30}$" , connection .Password ); ! ok {
134
+ if ok , _ := regexp .MatchString (`^[\w@#*. ]{4,30}$` , connection .Password ); ! ok {
135
135
c .JSON (common_err .CLIENT_ERROR , model.Result {Success : common_err .CHARACTER_LIMIT , Message : common_err .GetMsg (common_err .CHARACTER_LIMIT )})
136
136
return
137
137
}
138
- if ok , _ := regexp .MatchString ("^[a-zA-Z0-9 ]{4,30}$" , connection .Username ); ! ok {
138
+ if ok , _ := regexp .MatchString (`^[\w@#*. ]{4,30}$` , connection .Username ); ! ok {
139
139
c .JSON (common_err .CLIENT_ERROR , model.Result {Success : common_err .INVALID_PARAMS , Message : common_err .GetMsg (common_err .INVALID_PARAMS )})
140
140
return
141
141
}
You can’t perform that action at this time.
0 commit comments