Export to GitHub

mollify - issue #548

Invalid SQL query when table prefix used


Posted on May 12, 2014 by Helpful Hippo

What steps will reproduce the problem? 1.install current version mollify_2.5.11.zip and try mysql.

What is the expected output? What do you see instead? the user-table does not contain the column "password", the installer is unable to create an admin acount. The System is not able to work. The doc (https://code.google.com/p/mollify/wiki/ConfigurationMySql), chapter 4.2 states that one can create an admin user manually, that does not work, either (because of missing password column).

What version of the product are you using? On what operating system? mollify_2.5.11.zip Ubuntu 12.04

Please provide any additional information below.

Comment #1

Posted on May 12, 2014 by Swift Dog

The manual installation step was outdated, since password hashing was included it is no longer possible to enter passwords manually. The password is stored in separate table "user_auth".

Could you check what is the error during the installation?

Comment #2

Posted on May 12, 2014 by Helpful Hippo

Installation gives no error, when i try to login, i get the following error in the apache- errorlog:

[Mon May 12 12:37:56.402797 2014] [:error] [pid 10177] [client 95.33.170.62:56608] MOLLIFY ERROR: ServiceException: INVALID_CONFIGURATION=Error executing query (SELECT id, name, user_type, lang, email, user_auth.type as auth FROM mollify_user left outer join mollify_user_auth on user.id=user_auth.user_id WHERE name='root' AND (expiration is null or expiration > 20140512133756)): Unknown column 'user_auth.type' in 'field list', referer: xxxxx [Mon May 12 12:37:56.403126 2014] [:error] [pid 10177] [client 95.33.170.62:56608] MOLLIFY ERROR: {0:{file:/var/www/xxxxx/mollify/backend/include/configuration/ConfigurationDao.class.php, line:52, function:query, class:MySQLIDatabase, type:->, args:{0:SELECT id, name, user_type, lang, email, user_auth.type as auth FROM mollify_user left outer join mollify_user_auth on user.id=user_auth.user_id WHERE name='root' AND (expiration is null or expiration > 20140512133756)}}, 1:{file:/var/www/xxxxx/mollify/backend/include/Authentication.class.php, line:97, function:findUser, class:ConfigurationDao, type:->, args:{0:root, 1:, 2:1399891076}}, 2:{file:/var/www/xxxxx/mollify/backend/include/services/SessionServices.class.php, line:58, function:login, class:Authentication, type:->, args:{0:root, 1:mac80u33b}}, 3:{file:/var/www/xxxxx/mollify/backend/include/services/SessionServices.class.php, line:50, function:authenticate, class:SessionServices, type:->, args:{}}, 4:{file:/var/www/xxxxx/mollify/backend/include/services/ServicesBase.class.php, line:59, function:processPost, class:SessionServices, type:->, args:{}}, 5:{file:/var/www/xxxxx/mollify/backend/include/MollifyBackend.class.php, line:85, function:processRequest, class:ServicesBase, type:->, args:{}}, 6:{file:/var/www/xxxxx/mollify/backend/r.php, line:63, function:processRequest, class:MollifyBackend, type:->, args:{0:Request}}}, referer: xxxxx

Comment #3

Posted on May 12, 2014 by Swift Dog

It seems that when the last version added auth join in query, table prefix was not included.

I've made initial fix: https://github.com/sjarvela/mollify/commit/d87fccb5ab58d600196a39ecd4a85f4f08dc7cb0

You could try replacing the "backend/include/configuration/ConfigurationDao.class.php" with the one you can find here: https://raw.githubusercontent.com/sjarvela/mollify/d87fccb5ab58d600196a39ecd4a85f4f08dc7cb0/backend/include/configuration/ConfigurationDao.class.php

Comment #4

Posted on May 12, 2014 by Swift Dog

Issue 549 has been merged into this issue.

Comment #5

Posted on May 12, 2014 by Swift Dog

New version will be released after the fix has been verified.

Comment #6

Posted on May 12, 2014 by Helpful Hippo

your ConfigurationDao.class.php did the job.

thanks.

Comment #7

Posted on May 13, 2014 by Swift Dog

Fixed in 2.5.12

Status: Fixed

Labels:
Type-Defect Priority-Medium