1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Forwarded: https://github.com/pkg/sftp/pull/639
From: Simon Josefsson <simon@josefsson.org>
Date: Tue, 7 Oct 2025 15:32:45 +0200
Subject: [PATCH] Accept '-' in usernames for ls self-test
---
ls_formatting_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ls_formatting_test.go b/ls_formatting_test.go
index d6e5e03..c2c02b3 100644
--- a/ls_formatting_test.go
+++ b/ls_formatting_test.go
@@ -135,7 +135,7 @@ func runLsTestHelper(t *testing.T, result, expectedType, path string) {
// username / uid (len 8, number or string)
const (
- name = "(?:[a-z_][a-z0-9_]*)"
+ name = "(?:[a-z_][-a-z0-9_]*)"
)
if ok, err := regexp.MatchString("^(?:"+number+"|"+name+")+$", user); !ok {
if err != nil {
--
2.51.0
|