Skip to content

Commit 7c29841

Browse files
committed
sftp security fix
1 parent 1bb6474 commit 7c29841

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Storages/ManagedCode.Storage.Sftp/Options/SftpStorageOptions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ public class SftpStorageOptions : IStorageOptions
6868
public string? PrivateKeyContent { get; set; }
6969

7070
/// <summary>
71-
/// Accept any host key presented by the server (not recommended for production).
71+
/// Accept any host key presented by the server.
72+
/// WARNING: Setting this to true is INSECURE and should only be used for development/testing.
73+
/// In production, always set this to false and provide a valid HostKeyFingerprint.
7274
/// </summary>
73-
public bool AcceptAnyHostKey { get; set; } = true;
75+
public bool AcceptAnyHostKey { get; set; } = false;
7476

7577
/// <summary>
7678
/// Expected host key fingerprint when <see cref="AcceptAnyHostKey"/> is <c>false</c>.

0 commit comments

Comments
 (0)