zhang-arvin opened a new pull request, #12743:
URL: https://github.com/apache/gravitino/pull/12743

   ### What changes were proposed in this pull request?
   
   Fix the asymmetric set difference check in 
PolicyManager.updatePolicyEntity() that only blocks removing 
supportedObjectTypes from built-in policies, but silently allows adding new 
ones.
   
   ### Why are the changes needed?
   
   The original check uses Sets.difference(old, new).isEmpty() which only 
verifies that old types are not removed - it does not detect when new types are 
added. This allows silently changing the supported object types of built-in 
policies.
   
   Additionally, the error message format string was missing its format 
arguments.
   
   ### How was this patch tested?
   
   Manual verification that symmetric Sets.difference checks in both directions 
now correctly prevent any modification to supported object types of built-in 
policies.
   
   Fixes: #12685


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to