You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "iprithv (via GitHub)" <gi...@apache.org> on 2026/10/07 22:18:51 UTC

[PR] Restore strict boolean validation for the maintenance policy enable field [polaris]

iprithv opened a new pull request, #5735:
URL: https://github.com/apache/polaris/pull/5735

   The maintenance policy content accepts non-boolean values for `enable` - things like `"TRUE"`, `1` and `0` go through instead of being rejected.
   
   The cause: policy parsing moved to the Jackson 3 (`tools.jackson`) mapper (#4910), but the strict check on `enable` was still wired through a Jackson 2 `@JsonDeserialize` annotation pointing at a Jackson 2 `JsonDeserializer`. Jackson 3 ignores the Jackson 2 databind annotation, so `StrictBooleanDeserializer` never ran and the mapper's default lenient coercion took over. The one existing "wrong value" test uses `"invalid"`, which Jackson rejects on its own, so the gap was invisible.
   
   Fix is to port `StrictBooleanDeserializer` to the Jackson 3 `ValueDeserializer` API and move the annotation to `tools.jackson.databind.annotation.JsonDeserialize`, applied to the `enable` creator parameter (that's what actually binds for creator-based deserialization). Behavior is back to the original intent: JSON `true`/`false` and the lowercase string forms are accepted, everything else is rejected.
   
   Added parameterized tests for `"TRUE"`, `"False"`, `"yes"`, `1` and `0` as rejections, and kept `true`/`false` + `"true"`/`"false"` as accepted. The rejection test fails on the old wiring and passes after the port.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Restore strict boolean validation for the maintenance policy enable field [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b merged PR #5735:
URL: https://github.com/apache/polaris/pull/5735


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org