Affects Version/s: EJBCA 18.104.22.168
Fix Version/s: EJBCA 6.5.0
Issue discovered during:Customer
Only contains searches for details return results.
This is of course due to the fact that details are stored as serialized XML objects, like
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.7.0_91" class="java.beans.XMLDecoder">
<string>Generated new keypair in CryptoToken 1630042679</string>
Using a conditions like:
Details Contains Base64PutHashMap
returns all results.
From a database perspective, there is no way around doing %searchstring%-queries.
Option 1: Remove invalid conditions for "Details" (especially less than greater than makes no sense)
Option 2: Transform conditions to contains queries, e.g.
- "starts with ABC" → "%<string>ABC%"
- "ends with ABC" → "%ABC</string>%"
- "equals ABC=DEF" → "%<string>ABC</string>\n <string>DEF</string>%"
- Load results using non-details filter first into memory and process with Java code.
- If not sufficient results are found after filtering, load some more.
- Contains query for details should be rewritten as "%<string>querystring</string>%" to avoid that for example Base64PutHashMap matches.
It has been decided that this issue will be used to clean out invalid choices.