From 185923a7da3dee8cb759f9f0e4040133996ad37c Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 19 Dec 2020 02:34:41 +0100 Subject: [PATCH] Fix errors. about mommi config variables --- Content.Server/MoMMILink.cs | 6 ++++++ Content.Shared/CCVars.cs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Content.Server/MoMMILink.cs b/Content.Server/MoMMILink.cs index 1455598c47..facd9ce93f 100644 --- a/Content.Server/MoMMILink.cs +++ b/Content.Server/MoMMILink.cs @@ -82,6 +82,12 @@ namespace Content.Server var password = _configurationManager.GetCVar(CCVars.StatusMoMMIPassword); + if (string.IsNullOrEmpty(password)) + { + response.StatusCode = (int) HttpStatusCode.Forbidden; + return true; + } + OOCPostMessage message = null; try { diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index 06a99baa82..db9b5bc90c 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -12,10 +12,10 @@ namespace Content.Shared */ public static readonly CVarDef StatusMoMMIUrl = - CVarDef.Create("status.mommiurl", null); + CVarDef.Create("status.mommiurl", "", CVar.SERVERONLY); public static readonly CVarDef StatusMoMMIPassword = - CVarDef.Create("status.mommipassword", null); + CVarDef.Create("status.mommipassword", "", CVar.SERVERONLY); /*