kumarsivarajan / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

Invalid SQL query when table prefix used #548

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by fbuesc...@gmail.com on 12 May 2014 at 8:49

GoogleCodeExporter commented 8 years ago
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?

Original comment by samuli.j...@gmail.com on 12 May 2014 at 9:07

GoogleCodeExporter commented 8 years ago
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.c
lass.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.ph
p, line:58, function:login, class:Authentication, type:->, args:{0:root, 
1:mac80u33b}}, 
3:{file:/var/www/xxxxx/mollify/backend/include/services/SessionServices.class.ph
p, 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

Original comment by fbuesc...@gmail.com on 12 May 2014 at 10:40

GoogleCodeExporter commented 8 years ago
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/d87fccb5ab58d600196a39ecd4a85f4f08dc7
cb0

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

Original comment by samuli.j...@gmail.com on 12 May 2014 at 10:56

GoogleCodeExporter commented 8 years ago
Issue 549 has been merged into this issue.

Original comment by samuli.j...@gmail.com on 12 May 2014 at 11:58

GoogleCodeExporter commented 8 years ago
New version will be released after the fix has been verified.

Original comment by samuli.j...@gmail.com on 12 May 2014 at 11:59

GoogleCodeExporter commented 8 years ago
your ConfigurationDao.class.php did the job.

thanks.

Original comment by fbuesc...@gmail.com on 12 May 2014 at 2:16

GoogleCodeExporter commented 8 years ago
Fixed in 2.5.12

Original comment by samuli.j...@gmail.com on 13 May 2014 at 7:56