mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
allow to store temporary sessions within the data provider
so we can persist password reset codes, OIDC auth sessions and tokens. These features will also work in multi-node setups without sicky sessions now Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -163,7 +163,7 @@ func Initialize(c Configuration, isShared int) error {
|
||||
}
|
||||
}
|
||||
if c.DefenderConfig.Enabled {
|
||||
if !util.IsStringInSlice(c.DefenderConfig.Driver, supportedDefenderDrivers) {
|
||||
if !util.Contains(supportedDefenderDrivers, c.DefenderConfig.Driver) {
|
||||
return fmt.Errorf("unsupported defender driver %#v", c.DefenderConfig.Driver)
|
||||
}
|
||||
var defender Defender
|
||||
@@ -635,7 +635,7 @@ func (c *Configuration) checkPostDisconnectHook(remoteAddr, protocol, username,
|
||||
if c.PostDisconnectHook == "" {
|
||||
return
|
||||
}
|
||||
if !util.IsStringInSlice(protocol, disconnHookProtocols) {
|
||||
if !util.Contains(disconnHookProtocols, protocol) {
|
||||
return
|
||||
}
|
||||
go c.executePostDisconnectHook(remoteAddr, protocol, username, connID, connectionTime)
|
||||
|
||||
Reference in New Issue
Block a user