AlexanderKrutov / DataTables.Queryable

.Net library for clever processing of requests from datatables.net jQuery plugin on the server side (ASP.NET, Nancy or any other web server).
MIT License
51 stars 19 forks source link

NullReferenceException inside GetPropertyByName #34

Closed VictorioBerra closed 6 years ago

VictorioBerra commented 6 years ago

https://github.com/AlexanderKrutov/DataTables.Queryable/blob/master/DataTables.Queryable/DataTablesRequest.cs#L254

The bug is here type.GetProperty(parts[0]).PropertyType. GetProperty returns null, so this will explode and is never caught. Obviously this was hard to catch because it only happens when you are accessing a nested property.

AlexanderKrutov commented 6 years ago

Thank you! The fix is included in 1.7.2.

VictorioBerra commented 6 years ago

@AlexanderKrutov You are a good man. Thanks for being so quick on these.