Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81CCE11456 for ; Wed, 16 Apr 2014 01:20:42 +0000 (UTC) Received: (qmail 17525 invoked by uid 500); 16 Apr 2014 01:20:40 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 17472 invoked by uid 500); 16 Apr 2014 01:20:37 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 17223 invoked by uid 99); 16 Apr 2014 01:20:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2014 01:20:21 +0000 Date: Wed, 16 Apr 2014 01:20:21 +0000 (UTC) From: "Freeman Fang (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work started] (KARAF-2914) JAAS JDBCBackingEngineFactory: Wrong query from the configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-2914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on KARAF-2914 started by Freeman Fang. > JAAS JDBCBackingEngineFactory: Wrong query from the configuration > ----------------------------------------------------------------- > > Key: KARAF-2914 > URL: https://issues.apache.org/jira/browse/KARAF-2914 > Project: Karaf > Issue Type: Bug > Components: karaf-security > Affects Versions: 3.0.0 > Reporter: Mike Hummel > Assignee: Freeman Fang > > In JDBCBackingEngineFactory is in line 49 the following code: > String selectUsersQuery = (String) options.get(JDBCLoginModule.PASSWORD_QUERY); > PASSWORD_QUERY is ""SELECT PASSWORD FROM USERS WHERE USERNAME=? > but selectUserQuery should be "SELECT USERNAME FROM USERS" > looks like a mismatch. > The correct code should be: > String selectUsersQuery = (String) options.get(JDBCLoginModule.USER_QUERY); > in JDBCLoginModule.java: > public static final String USER_QUERY = "query.user" > and you need a separate selectPasswordQuery attribute. -- This message was sent by Atlassian JIRA (v6.2#6252)