Skip to content

Commit 2ca8ee9

Browse files
committed
Reverted a change where the regex wasn't being escaped properly.
1 parent 982a771 commit 2ca8ee9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Exceptionless/Storage/InMemoryObjectStorage.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,7 @@ public IEnumerable<ObjectInfo> GetObjectList(string searchPattern = null, int? l
9494
if (!maxCreatedDate.HasValue)
9595
maxCreatedDate = DateTime.MaxValue;
9696

97-
98-
#if PORTABLE || NETSTANDARD1_2
99-
var regex = new Regex("^" + Regex.Escape(searchPattern).Replace("\\*", ".*?").Replace("/*", ".*?") + "$");
100-
#else
101-
var regex = new Regex("^" + Regex.Escape(searchPattern).Replace(Path.DirectorySeparatorChar + "*", ".*?").Replace(Path.AltDirectorySeparatorChar + "*", ".*?") + "$");
102-
#endif
97+
var regex = new Regex("^" + Regex.Escape(searchPattern).Replace("\\*", ".*?") + "$");
10398
lock (_lock)
10499
return _storage.Keys.Where(k => regex.IsMatch(k)).Select(k => _storage[k].Item1).Where(f => f.Created <= maxCreatedDate).Take(limit ?? Int32.MaxValue).ToList();
105100
}

0 commit comments

Comments
 (0)