mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
allow numerical start and allow dots in ssh alias
We previously restricted the ssh alias to start with an alphabetic character and did not allow dots within it. This caused problems with users wanting to use an ip address as an alias. This lifts that restriction so both can freely be used. Note that while it is common to use the hostname as the alias, hostnames are not allowed to use the underscore character. However, we do allow the alias to contain an underscore. I do not think we can remove this from aliases now but it is something to watch out for in the future.
This commit is contained in:
parent
8d88e2cf94
commit
3227daaeaa
@ -116,7 +116,7 @@ var SetVarScopes = []SetVarScope{
|
||||
}
|
||||
|
||||
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 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_.:-]*$")
|
||||
var positionRe = regexp.MustCompile("^((S?\\+|E?-)?[0-9]+|(\\+|-|S|E))$")
|
||||
|
Loading…
Reference in New Issue
Block a user