Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008782TestLink0 - User too Lazy to analize defined categoriespublic2019-10-14 07:322019-10-14 13:49
Reporterlbrochard 
Assigned Tofman 
PriorityhighSeverityblockReproducibilityalways
StatusassignedResolutionopen 
PlatformOSRed Hat Enterprise Linux ServerOS Version7.4
Product Version1.9.19.01 (1.9.19 fixes) 
Fixed in Version 
Summary0008782: Problem after ldap authentication
DescriptionHello,

I have install testlink 1.9.18, 1.9.19 and 1.9.19.1 and i have the same problem.

I only have an ldap account. After authentication i have this error :

 ==============================================================================

 DB Access Error - debug_print_backtrace() OUTPUT START

 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)

            Having this additional Information could be useful for reporting

            issue to development TEAM.

 ==============================================================================

#0 database->exec_query( /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 44 WHERE testproject_id = 1226 AND active = 1 AND ORDER BY name, -1, -1) called at [/data/www/testlink-code-tl1.9.19.01/lib/functions/database.class.php:759]
#1 database->get_recordset( /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 44 WHERE testproject_id = 1226 AND active = 1 AND ORDER BY name) called at [/data/www/testlink-code-tl1.9.19.01/lib/functions/tlUser.class.php:1046]
0000002 tlUser->getAccessibleTestPlans(database Object ([db] => ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SELECT
            TABLE_NAME,
            CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA=,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => ,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[charSet] => ,[substr] => substring,[nameQuote] => `,[compat323] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table if not exists %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table if exists %s,[database] => testlink,[host] => testlink-mysql,[port] => ,[user] => testlink_user,[password] => not stored,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[arrayClass] => ADORecordSet_array,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[bulkBind] => ,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => Resource id #70,[_errorMsg] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY name' at line 1,[_errorCode] => ,[_queryID] => Resource id 0000095,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[] => Array (),[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 0,[overallDuration] => 0,[dbType] => mysql,[] => 0,[] => 0), 1226, ) called at [/data/www/testlink-code-tl1.9.19.01/lib/functions/common.php:442]
0000003 initProject(database Object ([db] => ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SELECT
            TABLE_NAME,
            CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA=,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => ,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[charSet] => ,[substr] => substring,[nameQuote] => `,[compat323] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table if not exists %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table if exists %s,[database] => testlink,[host] => testlink-mysql,[port] => ,[user] => testlink_user,[password] => not stored,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[arrayClass] => ADORecordSet_array,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[bulkBind] => ,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => Resource id #70,[_errorMsg] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY name' at line 1,[_errorCode] => ,[_queryID] => Resource id 0000095,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[] => Array (),[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 0,[overallDuration] => 0,[dbType] => mysql,[] => 0,[] => 0), Array ([tproject_id] => 0,[tplan_id] => 0,[updateMainPage] => 1)) called at [/data/www/testlink-code-tl1.9.19.01/lib/functions/common.php:508]
0000004 testlinkInitPage(database Object ([db] => ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SELECT
            TABLE_NAME,
            CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA=,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => ,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[charSet] => ,[substr] => substring,[nameQuote] => `,[compat323] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table if not exists %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table if exists %s,[database] => testlink,[host] => testlink-mysql,[port] => ,[user] => testlink_user,[password] => not stored,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[arrayClass] => ADORecordSet_array,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[bulkBind] => ,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => Resource id #70,[_errorMsg] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY name' at line 1,[_errorCode] => ,[_queryID] => Resource id 0000095,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[] => Array (),[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 0,[overallDuration] => 0,[dbType] => mysql,[] => 0,[] => 0), 1) called at [/data/www/testlink-code-tl1.9.19.01/lib/general/navBar.php:13]

The sql request seems to be bad.

Thanks.
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0029248)
fman (administrator)
2019-10-14 10:01

without a detailed scenario is impossible to provide help
have you tried to run this query
SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 44 WHERE testproject_id = 1226 AND active = 1 AND ORDER BY name

on the sql client to get a more detailed error message?
(0029249)
lbrochard (reporter)
2019-10-14 10:06

Hello,


This is the error message with Mysql version 5.7.21

mysql> SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 44 WHERE testproject_id = 1226 AND active = 1 AND ORDER BY name
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY name' at line 1
(0029250)
lbrochard (reporter)
2019-10-14 10:07

If i remove the last AND :

mysql> SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 44 WHERE testproject_id = 1226 AND active = 1 ORDER BY name;
Empty set (0,00 sec)
(0029254)
fman (administrator)
2019-10-14 12:50

OK
we need to understand in what condition the AND is added, this means I need more details regarding your scenario:
private test project?
private test plan?
etc
(0029256)
lbrochard (reporter)
2019-10-14 13:49

Hi,

I am not a testlink user. I am the sysadmin.

My account (with ldap auth) is an admin testlink account.

The default project after authentication seems to be public and there is no test plan on it.

- Issue History
Date Modified Username Field Change
2019-10-14 07:32 lbrochard New Issue
2019-10-14 10:01 fman Note Added: 0029248
2019-10-14 10:01 fman Assigned To => fman
2019-10-14 10:01 fman Status new => feedback
2019-10-14 10:06 lbrochard Note Added: 0029249
2019-10-14 10:06 lbrochard Status feedback => assigned
2019-10-14 10:07 lbrochard Note Added: 0029250
2019-10-14 12:50 fman Note Added: 0029254
2019-10-14 13:49 lbrochard Note Added: 0029256



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker