Skip to content

Commit bd4b8c7

Browse files
authored
Update README.md [breaking change 1.6.0]
1 parent 93d5b92 commit bd4b8c7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ int c = 10;
3030
db.Customers.WhereInterpolated($"City == {cityName} and Orders.Count >= {c}");
3131
```
3232

33+
---
34+
3335
## :exclamation: Breaking changes
3436

3537
### v1.3.0
36-
A breaking change is introduced in version 1.3.0 which is related to calling methods on classes.
38+
A breaking change is introduced in this version which is related to calling methods on classes.
3739
Due to security reasons, it's now only allowed to call methods on the standard predefined classes like (`bool`, `int`, `string` ...).
3840
If you want to call a method on an own custom class, annotate that class with the [DynamicLinqType](https://dynamic-linq.net/advanced-extending#dynamiclinqtype-attribute).
3941
Example:
@@ -44,11 +46,17 @@ public class MyCustomClass
4446
public int GetAge(int x) => x;
4547
}
4648
```
49+
If it's not possible to add that attribute, you need to implement a custom [CustomTypeProvider](https://dynamic-linq.net/advanced-configuration#customtypeprovider) and set this to the `ParsingConfig` and provide that config to all dynamic calls.
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).
4751

48-
If it's not possible to add that attribute, you need to implement a custom [CustomTypeProvider](https://dynamic-linq.net/advanced-configuration#customtypeprovider) and set this to the `ParsingConfig` and provide that config to the dynamic call.
52+
### v1.6.0-preview-01, 02, 03
53+
A breaking change is introduced in this version to solve CVE-2024-51417.
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+
To allow these methods set `AllowEqualsAndToStringMethodsOnObject` to `true` in the `ParsingConfig` and provide that config to all dynamic calls.
4956

50-
## Useful links
57+
---
5158

59+
## Useful links
5260
- [Website](https://dynamic-linq.net)
5361
- [Documentation](https://dynamic-linq.net/overview)
5462
- [Online examples](https://dynamic-linq.net/online-examples)
@@ -83,10 +91,10 @@ The following frameworks are supported:
8391
- uap10.0
8492

8593
### Fork details
86-
This fork takes the basic library to a new level. Contains XML Documentation and examples on how to use it. Also adds unit testing to help ensure that it works properly.
94+
This fork takes the basic library to a new level. Also adds unit tests to help ensure that it works properly.
8795

8896
Some background:
89-
I forked from https://github.com/NArnott/System.Linq.Dynamic and added some more functionality there.<br>My fork is still visible on github [https://github.com/StefH/System.Linq.Dynamic], however I decided to start a new project + nuget to avoid confusion and create the project according to the new VS2017 + .NET Core rules / standards.
97+
I forked from https://github.com/NArnott/System.Linq.Dynamic and added some more functionality there.<br>My fork is still visible on github [https://github.com/StefH/System.Linq.Dynamic], however I decided to start a new project + NuGet to avoid confusion and create the project according to the new VS2017 + .NET Core rules / standards.
9098

9199
However, currently there are multiple nuget packages and projects available:
92100

0 commit comments

Comments
 (0)