mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
Add client IP address to external auth, pre-login and keyboard interactive hooks
This commit is contained in:
@@ -37,7 +37,7 @@ type BaseConnection struct {
|
||||
// NewBaseConnection returns a new BaseConnection
|
||||
func NewBaseConnection(ID, protocol string, user dataprovider.User, fs vfs.Fs) *BaseConnection {
|
||||
connID := ID
|
||||
if utils.IsStringInSlice(protocol, supportedProcols) {
|
||||
if utils.IsStringInSlice(protocol, supportedProtocols) {
|
||||
connID = fmt.Sprintf("%v_%v", protocol, ID)
|
||||
}
|
||||
return &BaseConnection{
|
||||
@@ -79,7 +79,7 @@ func (c *BaseConnection) GetProtocol() string {
|
||||
// SetProtocol sets the protocol for this connection
|
||||
func (c *BaseConnection) SetProtocol(protocol string) {
|
||||
c.protocol = protocol
|
||||
if utils.IsStringInSlice(c.protocol, supportedProcols) {
|
||||
if utils.IsStringInSlice(c.protocol, supportedProtocols) {
|
||||
c.ID = fmt.Sprintf("%v_%v", c.protocol, c.ID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user