SEC-1199: JdbcMutableAclService can't create acl_object_identity entry in PostgreSQL #1451

Closed
spring-issuemaster opened this Issue Jul 16, 2009 · 4 comments

1 participant

@spring-issuemaster

Adam Dyga (Migrated from SEC-1199) said:

The JdbcMutableAclService fails to create acl_object_identity entry in Postgresql, because it passes string as the object_id_identity where an integer (long) type is expected (in method JdbcMutableAclService.createObjectIdentity() ).
The result is:

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into acl_object_identity (object_id_class, object_id_identity, owner_sid, entries_inheriting) values (?, ?, ?, ?)]; nested exception is org.postgresql.util.PSQLException: ERROR: column "object_id_identity" is of type bigint but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 51
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
at org.springframework.security.acls.jdbc.JdbcMutableAclService.createObjectIdentity(JdbcMutableAclService.java:157)
at org.springframework.security.acls.jdbc.JdbcMutableAclService.createAcl(JdbcMutableAclService.java:108)

@spring-issuemaster

Luke Taylor said:

Looks like a duplicate of SEC-1038.

@spring-issuemaster

Adam Dyga said:

True. However it's a pity that it's only fixed in 3.x branch...

@spring-issuemaster

Luke Taylor said:

Closing as duplicate.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 RC1 milestone Feb 5, 2016
@spring-issuemaster

This issue duplicates #1289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment