Skip to content

delete user wouldn't unlink it #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leoleoasd opened this issue Jun 20, 2023 · 1 comment
Closed

delete user wouldn't unlink it #124

leoleoasd opened this issue Jun 20, 2023 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@leoleoasd
Copy link

Describe the bug
If I delete a user from admin page without unlink it, then trying to login with the same OIDC user, it will give Null Pointer Exception.

To Reproduce
Steps to reproduce the behavior:

  1. create a user with oidc
  2. delete the user
  3. login again

Expected behavior
unlink previously linked user(which is already deleted), re-create the user and link

Logs

[10:17:32] [ERR] [207] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /sso/OID/Auth/kanidm.
System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Object.GetType()
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetOrCreateEntry(Object entity, IEntityType entityType)
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.EntryWithoutDetectChanges(TEntity entity)
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.Update(TEntity entity)
   at Jellyfin.Server.Implementations.Users.UserManager.UpdateUserAsync(User user)
   at Jellyfin.Server.Implementations.Users.UserManager.UpdateUserAsync(User user)
   at Jellyfin.Plugin.SSO_Auth.Api.SSOController.Authenticate(Guid userId, Boolean isAdmin, Boolean enableAuthorization, Boolean enableAllFolders, String[] enabledFolders, AuthResponse authResponse, String defaultProvider)
   at Jellyfin.Plugin.SSO_Auth.Api.SSOController.OidAuth(String provider, AuthResponse response)
   at lambda_method2151(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

Versions (please complete the following information):

  • OS: Linux
  • Browser: chrome
  • Jellyfin Version: 10.8.9
  • Plugin Version: 3.4.0.0

Probably solution

  1. unlink user while deleting it
  2. or delete the link on login when found user is deleted
@leoleoasd leoleoasd added the bug Something isn't working label Jun 20, 2023
@9p4
Copy link
Owner

9p4 commented Jun 20, 2023

dupe: #98

@9p4 9p4 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@9p4 9p4 added the duplicate This issue or pull request already exists label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants