acciente / oacc-core

OACC (Object ACcess Control) is an advanced Java Application Security Framework
http://oaccframework.org/
Apache License 2.0
107 stars 23 forks source link

setResourceCreatePermissions() accepts duplicate *CREATE permission with different grant options #14

Closed fspinnenhirn closed 9 years ago

fspinnenhirn commented 9 years ago

The setResourceCreatePermissions methods are not properly validating the set of requested permissions and currently accept duplicate *CREATE permissions that differ in their grant option.
This would cause a SQLException to be thrown when attempting to add those permissions.

This bug is an omission in the existing validation code and only affects the *CREATE system permission, i.e. duplicate non-system permissions that differ in grant options are properly caught and cause an IllegalArgumentException to be thrown.