update username regex to include dots and underscores

This commit is contained in:
sawka 2023-11-25 11:30:42 -08:00
parent 7d8f811228
commit 64203e7823

View File

@ -104,7 +104,7 @@ var SetVarScopes = []SetVarScope{
}
var hostNameRe = regexp.MustCompile("^[a-z][a-z0-9.-]*$")
var userHostRe = regexp.MustCompile("^(sudo@)?([a-z][a-z0-9-]*)@([a-z0-9][a-z0-9.-]*)(?::([0-9]+))?$")
var userHostRe = regexp.MustCompile("^(sudo@)?([a-z][a-z0-9_.-]*)@([a-z0-9][a-z0-9.-]*)(?::([0-9]+))?$")
var remoteAliasRe = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9_-]*$")
var genericNameRe = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9_ .()<>,/\"'\\[\\]{}=+$@!*-]*$")
var rendererRe = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9_.:-]*$")