mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
allow backslash in username
This involved converting the regexp string into a raw string to able to use the backslash character. this is important.
This commit is contained in:
parent
3227daaeaa
commit
cafe281241
@ -115,7 +115,7 @@ var SetVarScopes = []SetVarScope{
|
||||
{ScopeName: "remote", VarNames: []string{}},
|
||||
}
|
||||
|
||||
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-Z0-9][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_.:-]*$")
|
||||
|
Loading…
Reference in New Issue
Block a user