Skip to content

Commit 3c9ebd8

Browse files
committed
Added checks for valid formdata
1 parent 91681e3 commit 3c9ebd8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

App/Database/DbHelper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ public static IDictionary<string, string> ToDictionary(this IFormCollection col)
179179
public static FormObject? ToFormObject(this IFormCollection? formCollection, string? appUrl = null)
180180
{
181181
if (formCollection == null) return null;
182+
if (string.IsNullOrWhiteSpace(formCollection["ResourceType"])) return null;
183+
if (string.IsNullOrWhiteSpace(formCollection["ResourceLabel"])) return null;
182184
if (string.Equals(formCollection["ResourceType"], "EventStream", StringComparison.OrdinalIgnoreCase)
183185
&& (string.IsNullOrWhiteSpace(formCollection["Host"]) || string.IsNullOrWhiteSpace(formCollection["StreamTopic"])))
184186
{

0 commit comments

Comments
 (0)