-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
APIKey alone or APIKey with aliasname does not allow for requests #3091
Comments
Hi! |
This has been fixed in the develop branch! 🎉 🎈 |
…w an exception when only using the API Key #3091
Got this baby in docker. Cant see any roles, its just empty.
|
Describe the bug
When trying to post requests to ombi using just the apikey as a header, ombi returns a 500.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A successfull 200 response
Logs (Logs directory where Ombi is located)
[Error] Something bad happened, ErrorMiddleware caught this
System.ArgumentNullException: Value cannot be null.
Parameter name: user
at Microsoft.AspNetCore.Identity.UserManager`1.IsInRoleAsync(TUser user, String role)
at Ombi.Core.Rule.Rules.Request.AutoApproveRule.Execute(BaseRequest obj) in C:\projects\requestplex\src\Ombi.Core\Rule\Rules\Request\AutoApproveRule.cs:line 27
at Ombi.Core.Rule.RuleEvaluator.StartRequestRules(BaseRequest obj) in C:\projects\requestplex\src\Ombi.Core\Rule\RuleEvaluator.cs:line 42
at Ombi.Core.Engine.Interfaces.BaseEngine.RunRequestRules(BaseRequest model) in C:\projects\requestplex\src\Ombi.Core\Engine\Interfaces\BaseEngine.cs:line 47
at Ombi.Core.Engine.MovieRequestEngine.RequestMovie(MovieRequestViewModel model) in C:\projects\requestplex\src\Ombi.Core\Engine\MovieRequestEngine.cs:line 94
at Ombi.Controllers.RequestController.RequestMovie(MovieRequestViewModel movie) in C:\projects\requestplex\src\Ombi\Controllers\RequestController.cs:line 89
at lambda_method(Closure , Object )
at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
at Ombi.ApiKeyMiddlewear.ValidateApiKey(HttpContext context, RequestDelegate next, String key) in C:\projects\requestplex\src\Ombi\ApiKeyMiddlewear.cs:line 125
at Ombi.ApiKeyMiddlewear.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ApiKeyMiddlewear.cs:line 34
at Ombi.ErrorHandlingMiddleware.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ErrorHandlingMiddlewear.cs:line 24
Version 3.0.4659 (New Update Available)
OS Architecture X64
OS Description Linux 5.1.2-xanmod2 #1.190514 SMP PREEMPT Tue May 14 15:42:31 -03 2019
Process Architecture X64
Application Base Path /opt/Ombi
The text was updated successfully, but these errors were encountered: