mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
prefer errors.As to errors.Is
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -283,7 +283,8 @@ func (c *Configuration) getServerConfig() *ssh.ServerConfig {
|
||||
MaxAuthTries: c.MaxAuthTries,
|
||||
PublicKeyCallback: func(conn ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) {
|
||||
sp, err := c.validatePublicKeyCredentials(conn, pubKey)
|
||||
if errors.Is(err, &ssh.PartialSuccessError{}) {
|
||||
var partialSuccess *ssh.PartialSuccessError
|
||||
if errors.As(err, &partialSuccess) {
|
||||
return sp, err
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user