You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,15 @@ If it's not possible to add that attribute, you need to implement a custom [Cust
50
50
Or provide a list of addtional types in the [DefaultDynamicLinqCustomTypeProvider.cs](https://github.com/zzzprojects/System.Linq.Dynamic.Core/blob/master/src/System.Linq.Dynamic.Core/CustomTypeProviders/DefaultDynamicLinqCustomTypeProvider.cs).
51
51
52
52
### v1.6.0-preview-01, 02, 03
53
-
A breaking change is introduced in this version to solve CVE-2024-51417.
53
+
#### Change 1
54
54
It's not allowed anymore to call any methods on the `object` type. By default also the `ToString` and `Equals` methods are not allowed.
55
55
To allow these methods set `AllowEqualsAndToStringMethodsOnObject` to `true` in the `ParsingConfig` and provide that config to all dynamic calls.
56
+
This is done to mitigate the risk of calling methods on the `object` type which could lead to security issues (CVE-2024-51417).
57
+
58
+
#### Change 2
59
+
By default the `RestrictOrderByToPropertyOrField` is now set to `true` in the `ParsingConfig`.
60
+
Which means that only properties and fields can be used in the `OrderBy` / `ThenBy`.
61
+
This is done to mitigate the risk of calling methods or other expressions in the `OrderBy` / `ThenBy` which could lead to security issues.
/// When set to <c>true</c>, the parser will restrict the OrderBy method to only allow properties or fields.
310
+
/// When set to <c>true</c>, the parser will restrict the OrderBy and ThenBy methods to only allow properties or fields. If set to <c>false</c>, any expression is allowed.
/// When set to <c>true</c>, the parser will allow the use of the Equals(object obj), Equals(object objA, object objB), ReferenceEquals(object objA, object objB) and ToString() methods on the <see cref="object"/> type.
0 commit comments