Hi Oli,
> I have a (severe?) issue with the SQL abstraction layer. I am using mysql as
> backend and unfortunatly no clue about other rdbms - therefore I need some
> feedback if the issue is mysql only or not.
>
> Problem:
> I am searching a certificate by its subject, the subject I am looking for
> contains a backshlash character.
>
> my $issuer_dn = "OU=Trustcenter,O=Snakeoil\, Inc.,C=US";
> CTX('dbi_backend')->first(
> TABLE => 'CERTIFICATE',
> COLUMNS => [ 'IDENTIFIER' ],
> DYNAMIC => {
> 'SUBJECT' => $issuer_dn,
> 'PKI_REALM' => $pki_realm
> });
I discussed this with Oli, we think the situation is not very easy to solve.
The problem here is that the quote character in fact quotes the string for
OpenSSL, not for the database. If we simply quote the query string we are
effectively also qouting all SQL wildcards a search might want to use (and the
frontend does this liberally).
Oli has proposed to introduce heuristics which determine if SQL wildcards are
used and to use like in this case, equality match otherwise.
We will be testing this in dev before it gets committed.
If anybody has a decent idea how to handle this properly please comment...
cu
Martin
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenXPKI-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-devel