Adjust the username regex - '_' character (#94)

* adjust the username regex - '_' character

* also allow dot in username regex (sawka)
This commit is contained in:
Luke (Zgroza) Klimek 2023-11-27 21:44:53 +01:00 committed by GitHub
parent 514156b07f
commit 98b373d401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,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_.:-]*$")