mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-16 08:52:20 +08:00
Adding null check for query string parameters in AuditTrail to prevent possible YSOD
This commit is contained in:
parent
9466d91438
commit
66af4a8cdf
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
|
|
||||||
@ -15,7 +16,9 @@ namespace Orchard.AuditTrail.Services.Models {
|
|||||||
var filters = new Filters(updateModel);
|
var filters = new Filters(updateModel);
|
||||||
|
|
||||||
foreach (string nameValue in nameValues) {
|
foreach (string nameValue in nameValues) {
|
||||||
filters.Add(nameValue, nameValues[nameValue]);
|
if (!String.IsNullOrEmpty(nameValue)) {
|
||||||
|
filters.Add(nameValue, nameValues[nameValue]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return filters;
|
return filters;
|
||||||
|
Loading…
Reference in New Issue
Block a user