mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-02 22:52:33 -08:00
ssh/tailssh: Max Username Length 256 for linux
Max username length is increased to 256 on linux to match /usr/include/bits/local_lim.h Fixes #8277 Signed-off-by: Derek Burdick <[email protected]>
This commit is contained in:
1 parent
64f16f7f38
commit
d3c8c3dd00
1 file changed
+5
-1
+5
-1
@@ -81,7 +81,11 @@ func userLookup(username string) (*userMeta, error) {
|
||||
}
|
||||
|
||||
func validUsername(uid string) bool {
|
||||
if len(uid) > 32 || len(uid) == 0 {
|
||||
maxUid := 32
|
||||
if runtime.GOOS == "linux" {
|
||||
maxUid = 256
|
||||
}
|
||||
if len(uid) > maxUid || len(uid) == 0 {
|
||||
return false
|
||||
}
|
||||
for _, r := range uid {
|
||||
|
||||
Reference in new issue
Block a user