SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
173 stars 112 forks source link

Cannot save a webhook if the custom payload contains unknown properties #1965

Closed tusmester closed 7 months ago

tusmester commented 10 months ago

The template replacer feature throws a nullref exception if the template contains unknown content properties in a parameter expression.

This is a problem in case of webhooks, because when we save a webhook subscription with a custom payload, we have to check if the json is formatted correctly. And we can only do that if we replace the parameters with dummy values first.

Solution: the template replaces should not throw an exception in case of unknown properties - simply insert an empty value.