diff --git a/helper/funcs.go b/helper/funcs.go index e66ff40d1..49b300c24 100644 --- a/helper/funcs.go +++ b/helper/funcs.go @@ -263,6 +263,7 @@ func CleanEnvVar(s string, r byte) string { for i, c := range b { switch { case c == '_': + case c == '.': case c >= 'a' && c <= 'z': case c >= 'A' && c <= 'Z': case i > 0 && c >= '0' && c <= '9': diff --git a/helper/funcs_test.go b/helper/funcs_test.go index 564765c62..774030be1 100644 --- a/helper/funcs_test.go +++ b/helper/funcs_test.go @@ -66,7 +66,8 @@ func TestClearEnvVar(t *testing.T) { {"asd0", "asd0"}, {"_asd", "_asd"}, {"-asd", "_asd"}, - {"A~!@#$%^&*()_+-={}[]|\\;:'\"<,>.?/Z", "A_______________________________Z"}, + {"asd.fgh", "asd.fgh"}, + {"A~!@#$%^&*()_+-={}[]|\\;:'\"<,>?/Z", "A______________________________Z"}, {"A\U0001f4a9Z", "A____Z"}, } for _, c := range cases {