From 0e2148264abfb0e706e4d47cdf08807e0d704739 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Wed, 1 May 2024 04:07:40 -0700 Subject: [PATCH] Fix --stfp "mac-algos=..." overwrites cipher algorithms (#19643) Setting MAC algorithms overwrites cipher algorithms. Followup to #19636 --- cmd/object-api-listobjects_test.go | 8 ++++---- cmd/sftp-server.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/object-api-listobjects_test.go b/cmd/object-api-listobjects_test.go index 28fd824f9..cc6d422e4 100644 --- a/cmd/object-api-listobjects_test.go +++ b/cmd/object-api-listobjects_test.go @@ -878,7 +878,7 @@ func _testListObjects(obj ObjectLayer, instanceType string, t1 TestErrHandler, v // Marker being set to a value which is lesser than and all object names when sorted (37). // Expected to send all the objects in the bucket in this case. {"test-bucket-list-object", "", "Abc", "", 10, resultCases[14], nil, true}, - // Marker is to a hierarhical value (38-39). + // Marker is to a hierarchical value (38-39). {"test-bucket-list-object", "", "Asia/India/India-summer-photos-1", "", 10, resultCases[15], nil, true}, {"test-bucket-list-object", "", "Asia/India/Karnataka/Bangalore/Koramangala/pics", "", 10, resultCases[16], nil, true}, // Testing with marker and truncation, but no prefix (40-42). @@ -909,7 +909,7 @@ func _testListObjects(obj ObjectLayer, instanceType string, t1 TestErrHandler, v {"test-bucket-list-object", "Asia", "", SlashSeparator, 10, resultCases[25], nil, true}, {"test-bucket-list-object", "new", "", SlashSeparator, 10, resultCases[26], nil, true}, {"test-bucket-list-object", "Asia/India/", "", SlashSeparator, 10, resultCases[27], nil, true}, - // Test with marker set as hierarhical value and with delimiter. (58-59) + // Test with marker set as hierarchical value and with delimiter. (58-59) {"test-bucket-list-object", "", "Asia/India/India-summer-photos-1", SlashSeparator, 10, resultCases[28], nil, true}, {"test-bucket-list-object", "", "Asia/India/Karnataka/Bangalore/Koramangala/pics", SlashSeparator, 10, resultCases[29], nil, true}, // Test with prefix and delimiter set to '/'. (60) @@ -1618,7 +1618,7 @@ func testListObjectVersions(obj ObjectLayer, instanceType string, t1 TestErrHand // Marker being set to a value which is lesser than and all object names when sorted (35). // Expected to send all the objects in the bucket in this case. {"test-bucket-list-object", "", "Abc", "", 10, resultCases[14], nil, true}, - // Marker is to a hierarhical value (36-37). + // Marker is to a hierarchical value (36-37). {"test-bucket-list-object", "", "Asia/India/India-summer-photos-1", "", 10, resultCases[15], nil, true}, {"test-bucket-list-object", "", "Asia/India/Karnataka/Bangalore/Koramangala/pics", "", 10, resultCases[16], nil, true}, // Testing with marker and truncation, but no prefix (38-40). @@ -1649,7 +1649,7 @@ func testListObjectVersions(obj ObjectLayer, instanceType string, t1 TestErrHand {"test-bucket-list-object", "Asia", "", SlashSeparator, 10, resultCases[25], nil, true}, {"test-bucket-list-object", "new", "", SlashSeparator, 10, resultCases[26], nil, true}, {"test-bucket-list-object", "Asia/India/", "", SlashSeparator, 10, resultCases[27], nil, true}, - // Test with marker set as hierarhical value and with delimiter. (56-57) + // Test with marker set as hierarchical value and with delimiter. (56-57) {"test-bucket-list-object", "", "Asia/India/India-summer-photos-1", SlashSeparator, 10, resultCases[28], nil, true}, {"test-bucket-list-object", "", "Asia/India/Karnataka/Bangalore/Koramangala/pics", SlashSeparator, 10, resultCases[29], nil, true}, // Test with prefix and delimiter set to '/'. (58) diff --git a/cmd/sftp-server.go b/cmd/sftp-server.go index e68aeadb5..1ebd1fdad 100644 --- a/cmd/sftp-server.go +++ b/cmd/sftp-server.go @@ -196,7 +196,7 @@ func startSFTPServer(args []string) { case "cipher-algos": allowCiphers = filterAlgos(arg, strings.Split(tokens[1], ","), supportedCiphers) case "mac-algos": - allowCiphers = filterAlgos(arg, strings.Split(tokens[1], ","), supportedMACs) + allowMACs = filterAlgos(arg, strings.Split(tokens[1], ","), supportedMACs) } }