[VOMS-768] Unsafe handling of empty strings in the audit event addDataPoint method Created: 20/Sep/16  Updated: 27/May/21  Resolved: 20/Sep/16

Status: Closed
Project: VOMS
Component/s: admin-server
Affects Version/s: VOMS Admin server v. 3.5.0
Fix Version/s: VOMS Admin server v. 3.5.1
Security Level: Public (Visbile by non-authn users.)

Type: Bug Priority: Major
Reporter: Andrea Ceccanti Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The audit event data requires that non-empty strings are passed in for event data points:

https://github.com/italiangrid/voms-admin-server/blob/a4c4d0bdcc5ffcb30765b1fd63bd3dc466c8af3c/voms-admin-server/src/main/java/org/glite/security/voms/admin/persistence/model/audit/AuditEventData.java#L48

However, the nullSafeCheck helper method does not handle empty strings correctly, so this can result in exceptions raised when adding a data point that contains an empty string value.

https://github.com/italiangrid/voms-admin-server/blob/0935532eb5b6447dbaf81f4af062c3474a0aac11/voms-admin-server/src/main/java/org/glite/security/voms/admin/event/auditing/NullHelper.java#L24

https://github.com/italiangrid/voms-admin-server/blob/a4c4d0bdcc5ffcb30765b1fd63bd3dc466c8af3c/voms-admin-server/src/main/java/org/glite/security/voms/admin/persistence/model/audit/AuditEvent.java#L117



 Comments   
Comment by Andrea Ceccanti [ 20/Sep/16 ]

https://github.com/italiangrid/voms-admin-server/pull/48

Generated at Wed Apr 09 11:00:31 CEST 2025 using Jira 10.3.4#10030004-sha1:d6812f2d35a143c1c5fc283d2f5a72582f40aaf1.