diff --git a/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs b/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs index cecd5f2c93..3a76b8bc5b 100644 --- a/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs +++ b/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -291,6 +291,9 @@ namespace Tgstation.Server.Host.Controllers if (directory == null) throw new ArgumentNullException(nameof(directory)); + if (directory.Path == null) + return BadRequest(new ErrorMessage(ErrorCode.ModelValidationFailure)); + if (ForbidDueToModeConflicts(directory.Path, out var systemIdentity)) return Forbid();