Letractively / webpasswordsafe

Automatically exported from code.google.com/p/webpasswordsafe
0 stars 0 forks source link

DatabaseAuditLogger exception occurs when message is too long #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Configure to use the DatabaseAuditLogger implementation
2. Generate an audit event that creates a target or message greater than 100 
characters long, such as performing a search for a very long query or including 
tags with very long names
3. An error occurs because the input is too long for the database, and rolls 
back the entire transaction and gives a 500 error to the client

What is the expected output? What do you see instead?
1. No error should occur and the transaction should return successfully
2. The target and message columns should probably be text types, rather than 
varchar(x) since who knows how long x may be especially when people use the 
audit log in custom developed plugins
3. Furthermore, audit plugins should probably catch and eat any exceptions that 
occur rather than throwing to the parent service and causing the business 
transaction to rollback just because it could log the event.  However there may 
be some cases where if an event cannot be audit logged successfully, it 
shouldn't be allowed to complete successfully.

Original issue reported on code.google.com by joshdrum...@gmail.com on 9 Dec 2010 at 4:19

GoogleCodeExporter commented 8 years ago
Will not catch exceptions for now, just changed database schema...

Original comment by joshdrum...@gmail.com on 9 Dec 2010 at 8:07