Re: Re: Error trying to use 'mod_auth_form' and 'mod_dbd' with sqlite3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/26/2017 06:49 AM, Tom Browder wrote:
On Wed, Apr 26, 2017 at 05:06 Tom Browder <tom.browder@xxxxxxxxx <mailto:tom.browder@xxxxxxxxx>> wrote:

    On Wed, Apr 26, 2017 at 04:04 Luca Toscano <toscano.luca@xxxxxxxxx
    <mailto:toscano.luca@xxxxxxxxx>> wrote:

            > I think I just discovered I what the problem is: I'm using harp.js to
            > build my site and the <form...> is compiling incorrectly.

            Well, that wasn't the problem.

            The error is still:

            [dbd:error] [pid 18921:tid 140512673658624] (20014)Internal error:
            Â  AH00632: failed to prepare SQL statements: near "authn_query": syntax error


I have no clue as to why dbd isn'initializing. Untill someone can tell me exactly how to get it
working, I'm going to try the file method. Bummer!

-Tom

I am able to reproduce your error, and it does seem to be a bug in mod_dbd when prepared statements are used inside <Directory> blocks for authentication.

Instead of using DBDPrepareSQL to create a prepared statement, please try removing the DBDPrepareSQL line entirely and put your SQL statement directly in your AuthDBDUserPWQuery directive, like this:

     AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"

Note that Luca's advice was correct: no single-quotes around the %s, and no terminating semicolon should be used in the SQL for httpd configuration directives, even though you would use them in interactive sqlite3 SQL commands.

There should be no performance penalty for doing it this way. AuthDBDUserPWQuery automatically generates prepared statements. Your original directives seem reasonable per the current documentation, so it's a bug - although I'm not sure (yet) if it's a doc bug or a code bug.

-tom-





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux