OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Prevent TermsFilter from having to deal with empty strings #8727

Closed MatteoPiovanelli-Laser closed 6 months ago

MatteoPiovanelli-Laser commented 8 months ago

We noticed there was a chance for the TermsFilter to throw an exception, locking backoffice users from being able to edit the filter and use it. This happened in some cases when the user would select the taxonomy rather than a term, because the value for the taxonomy is an empty string: that could result in the filter attempting to parse empty strings to integers. So: