Pārlūkot izejas kodu

dataprovider: prevent action execution after external authentication

As per the documentation for external authentication, provider actions
should  not be executed post-authentication.

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 2 mēneši atpakaļ
vecāks
revīzija
6bde42fc3f
1 mainītis faili ar 0 papildinājumiem un 4 dzēšanām
  1. 0 4
      internal/dataprovider/dataprovider.go

+ 0 - 4
internal/dataprovider/dataprovider.go

@@ -4520,7 +4520,6 @@ func doExternalAuth(username, password string, pubKey []byte, keyboardInteractiv
 				webDAVUsersCache.swap(&user, password)
 			}
 			cachedUserPasswords.Add(user.Username, password, user.Password)
-			executeAction(operationUpdate, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
 		}
 		return user, err
 	}
@@ -4528,7 +4527,6 @@ func doExternalAuth(username, password string, pubKey []byte, keyboardInteractiv
 	if err != nil {
 		return user, err
 	}
-	executeAction(operationAdd, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
 	return provider.userExists(user.Username, "")
 }
 
@@ -4594,7 +4592,6 @@ func doPluginAuth(username, password string, pubKey []byte, ip, protocol string,
 				webDAVUsersCache.swap(&user, password)
 			}
 			cachedUserPasswords.Add(user.Username, password, user.Password)
-			executeAction(operationUpdate, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
 		}
 		return user, err
 	}
@@ -4602,7 +4599,6 @@ func doPluginAuth(username, password string, pubKey []byte, ip, protocol string,
 	if err != nil {
 		return user, err
 	}
-	executeAction(operationAdd, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
 	return provider.userExists(user.Username, "")
 }