mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-21 03:57:19 +01:00
Fix null reference warning
This commit is contained in:
@@ -244,7 +244,7 @@ namespace Tgstation.Server.Api
|
||||
else
|
||||
{
|
||||
var auth = authorization.First();
|
||||
var splits = new List<string>(auth.Split(' '));
|
||||
var splits = new List<string>(auth?.Split(' ') ?? Enumerable.Empty<string>());
|
||||
var scheme = splits.First();
|
||||
if (String.IsNullOrWhiteSpace(scheme))
|
||||
AddError(HeaderErrorTypes.AuthorizationInvalid, "Missing authentication scheme!");
|
||||
|
||||
Reference in New Issue
Block a user