Re: Feature request: more flexible database lookups

From: Murray S. Kucherawy <msk_at_blackops.org>
Date: Tue, 6 Oct 2015 21:38:12 -0700 (PDT)

Actually:

On Tue, 6 Oct 2015, John Massai wrote:
> Simple test I tried:
>
> ?filter="private_key <> ''"

I think this won't work; it generated this SQL:

   SELECT keyname FROM signingtable WHERE addr = 'foo' AND "private_key <> ''"

> ?filter=private_key <> ''

This one worked for me; the produced SQL was:

   SELECT keyname FROM signingtable WHERE addr = 'foo' AND private_key <> ''

...which I think is valid. It's not proper URL encoding obviously, but
opendkim lets you get away with it.

> The person who asked last year (
> http://lists.opendkim.org/archive/opendkim/users/2014/06/3201.html )
> was trying this:
>
> ?filter='`private_key` NOT LIKE ""'

...yields:

   SELECT keyname FROM signingtable WHERE addr = 'foo' AND '`private_key` NOT LIKE ""'

The quoting looks suspect there too.

opendkim should probably demand hex encoding for anything for which
ispunct() and isspace() is true, except "?" which marks the start of
another URL query clause.

-MSK
Received on Wed Oct 07 2015 - 04:38:29 PST

This archive was generated by hypermail 2.3.0 : Wed Oct 07 2015 - 04:45:02 PST