From fac68e3aa1befe73d241a56832152c9fa523d7a5 Mon Sep 17 00:00:00 2001 From: Francisco Mancardi Date: Mon, 27 Jan 2020 22:19:58 +0100 Subject: [PATCH 1/8] typo error --- .../1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql index 35ae92a287..721454b326 100644 --- a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql +++ b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql @@ -22,8 +22,8 @@ ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255); -- ALTER TABLE /*prefix*/testplan_platforms ADD COLUMN active tinyint(1) NOT NULL default '1'; -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0', -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1', +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0'; +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1'; CREATE TABLE /*prefix*/testcase_platforms ( From 2a1bc453546471e2ca653e27d4f39faaaf9710e9 Mon Sep 17 00:00:00 2001 From: Francisco Mancardi Date: Mon, 27 Jan 2020 22:38:16 +0100 Subject: [PATCH 2/8] fix (user contribution) --- .../DB.1.9.20/step1/db_schema_update.sql | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql index 721454b326..d66a253c2b 100644 --- a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql +++ b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql @@ -18,13 +18,35 @@ ALTER TABLE /*prefix*/builds ADD COLUMN branch varchar(64) NULL; ALTER TABLE /*prefix*/builds ADD COLUMN release_candidate varchar(100) NULL; -- -ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255); +ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255) NOT NULL default ''; -- ALTER TABLE /*prefix*/testplan_platforms ADD COLUMN active tinyint(1) NOT NULL default '1'; ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0'; ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1'; +-- +ALTER TABLE /*prefix*/nodes_hierarchy ADD INDEX /*prefix*/nodes_hierarchy_node_type_id (node_type_id); +ALTER TABLE /*prefix*/testcase_keywords ADD INDEX /*prefix*/idx02_testcase_keywords (tcversion_id); + +ALTER TABLE /*prefix*/milestones MODIFY target_date date NOT NULL; +ALTER TABLE /*prefix*/milestones MODIFY start_date date DEFAULT NULL; + +-- +CREATE TABLE /*prefix*/execution_tcsteps_wip ( + id int(10) unsigned NOT NULL auto_increment, + tcstep_id int(10) unsigned NOT NULL default '0', + testplan_id int(10) unsigned NOT NULL default '0', + platform_id int(10) unsigned NOT NULL default '0', + build_id int(10) unsigned NOT NULL default '0', + tester_id int(10) unsigned default NULL, + creation_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + notes text, + status char(1) default NULL, + PRIMARY KEY (id), + UNIQUE KEY /*prefix*/execution_tcsteps_wip_idx1(`tcstep_id`,`testplan_id`,`platform_id`,`build_id`) +) DEFAULT CHARSET=utf8; + CREATE TABLE /*prefix*/testcase_platforms ( id int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -45,7 +67,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_context ( end_exec_ts timestamp NOT NULL, creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), - UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts), + UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts) ) DEFAULT CHARSET=utf8; @@ -73,9 +95,6 @@ AS SELECT tcversion_id, testplan_id,build_id,platform_id,max(id) AS id FROM /*prefix*/executions GROUP BY tcversion_id,testplan_id,build_id,platform_id; -ALTER TABLE /*prefix*/nodes_hierarchy ADD INDEX /*prefix*/nodes_hierarchy_node_type_id (node_type_id); -ALTER TABLE /*prefix*/testcase_keywords ADD INDEX /*prefix*/idx02_testcase_keywords (tcversion_id); - CREATE OR REPLACE VIEW /*prefix*/tcversions_without_platforms AS SELECT From b3004c6fa1b7cfcb61023b339f95212d706d9a11 Mon Sep 17 00:00:00 2001 From: DavlinLotze Date: Sat, 9 May 2020 07:45:44 -0700 Subject: [PATCH 3/8] Fix #0008915 Update url in README.md #0008915 Update url in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 590da268be..2876310202 100644 --- a/README.md +++ b/README.md @@ -755,7 +755,7 @@ BEFORE the commit ID. => then Nike => Just DO IT [upgf]: http://forum.testlink.org/viewforum.php?f=11 [uupg]: http://forum.testlink.org/viewforum.php?f=58 [tucf]: http://www.testlink.org/ -[mbug]: http://www.testlink.org/mantis/ +[mbug]: http://mantis.testlink.org/ [twt]: http://twitter.com/#!/TLOpenSource [free]: http://www.freetest.net.br [csrf]: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet From 456659df477da5ece7fca1863bc9b5817c48299f Mon Sep 17 00:00:00 2001 From: Jakob <23484008+Pagefreak@users.noreply.github.com> Date: Sun, 28 Mar 2021 20:05:22 +0200 Subject: [PATCH 4/8] Added chosen search to reqTcAssign (#290) * Added chosen search to reqTcAssign * Width of select fixed --- .../tl-classic/requirements/reqTcAssign.tpl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gui/templates/tl-classic/requirements/reqTcAssign.tpl b/gui/templates/tl-classic/requirements/reqTcAssign.tpl index a9fb0e1011..266cb352dd 100644 --- a/gui/templates/tl-classic/requirements/reqTcAssign.tpl +++ b/gui/templates/tl-classic/requirements/reqTcAssign.tpl @@ -58,8 +58,6 @@ function refreshAndClose(tcase_id,callback) { {$msgReqLinkingEnabled = $labels.reqLinkingDisabledAfterExec} {/if} - - {$sep = $smarty.const.TITLE_SEP} {$tcIdentity = "{$gui->tcTitle|escape} "} @@ -83,9 +81,10 @@ function refreshAndClose(tcase_id,callback) { {/if}

{$labels.req_spec} - + {html_options options=$gui->arrReqSpec selected=$gui->selectedReqSpec} - +

{if $gui->showCloseButton}
@@ -239,5 +238,11 @@ function refreshAndClose(tcase_id,callback) {
{/if} + + - \ No newline at end of file + From df6ee30bab35a4031f5b7b81c219c04d13c7c3d5 Mon Sep 17 00:00:00 2001 From: JSFamily Date: Mon, 29 Mar 2021 03:08:12 +0900 Subject: [PATCH 5/8] fix: jira needs accountdId instead of user name while issue creation (#305) --- .../jirarestInterface.class.php | 10 +++-- third_party/fayp-jira-rest/Jira.php | 38 ++++++++++++++++++- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/lib/issuetrackerintegration/jirarestInterface.class.php b/lib/issuetrackerintegration/jirarestInterface.class.php index c8ac3c713b..5ba68b879b 100644 --- a/lib/issuetrackerintegration/jirarestInterface.class.php +++ b/lib/issuetrackerintegration/jirarestInterface.class.php @@ -401,9 +401,13 @@ public function addIssue($summary,$description,$opt=null) } } - - if (property_exists($opt, 'reporter')) { - $issue['fields']['reporter'] = array('name' => (string)$opt->reporter); + if (property_exists($opt, 'reporter')) { + $accountid = $this->APIClient->getAccountId($opt->reporter_email); + if($accountid) { + $issue['fields']['reporter'] = array('accountId' => (string)$accountid); + } else { + $issue['fields']['reporter'] = array('name' => (string)$opt->reporter); + } } if (property_exists($opt, 'issueType')) { diff --git a/third_party/fayp-jira-rest/Jira.php b/third_party/fayp-jira-rest/Jira.php index b4ab479215..448bba5219 100644 --- a/third_party/fayp-jira-rest/Jira.php +++ b/third_party/fayp-jira-rest/Jira.php @@ -523,5 +523,39 @@ public function getCreateIssueMetadata($projectKeys=null,$opt=null) return $items; } - -} \ No newline at end of file + /** + * getAccountId + * + * @return mixed + */ + public function getAccountId($email) + { + $cmd = $this->host . 'groupuserpicker?query=' . $email; + $this->request->openConnect($cmd, 'GET'); + $this->request->execute(); + if ($result = json_decode($this->request->getResponseBody())) { + if (!isset($result->users)) { + //error_log('cannot find user'); + return false; + } + $infos = $result->users->users; + $cnt = $result->users->total; + if ($infos) { + foreach ($infos as $info) { + if ($info->accountId) { + return $info->accountId; + } + } + } + return false; + } + else + { + // ATTENTION \Exception in order to use PHP object. + $msg = "Error Processing Request - " . __METHOD__ . ' ' . + implode('/', $items->errorMessages); + throw new \Exception($msg, 999); + } + return false; + } +} From 0e4b6a4ac3e5cb0c572fef86b7845b11259c687e Mon Sep 17 00:00:00 2001 From: naofum Date: Mon, 29 Mar 2021 03:12:28 +0900 Subject: [PATCH 6/8] fix unable to login with github (#299) --- lib/functions/oauth_providers/github.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/functions/oauth_providers/github.php b/lib/functions/oauth_providers/github.php index 4137c2f7bb..333308309f 100644 --- a/lib/functions/oauth_providers/github.php +++ b/lib/functions/oauth_providers/github.php @@ -58,6 +58,7 @@ function oauth_get_token($authCfg, $code) { // If token is received start session if (isset($tokenInfo->access_token)) { $oauthParams['access_token'] = $tokenInfo->access_token; + $curlContentType = array('Authorization: token ' . $tokenInfo->access_token, 'Content-Type: application/xml','Accept: application/json'); $queryString = http_build_query($tokenInfo); $targetURL = array(); From 0d8c2c872ebbaedfabca469bb2950e46b2140392 Mon Sep 17 00:00:00 2001 From: GuiGui <53662627+organix7@users.noreply.github.com> Date: Sun, 20 Oct 2024 11:08:44 +0200 Subject: [PATCH 7/8] Update tlUser.class.php (#356) Fix type juggling vulnerability. --- lib/functions/tlUser.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions/tlUser.class.php b/lib/functions/tlUser.class.php index fc6f8959db..77330a323d 100644 --- a/lib/functions/tlUser.class.php +++ b/lib/functions/tlUser.class.php @@ -587,7 +587,7 @@ public function comparePassword(&$dbH,$pwd) // MD5 hash check // This is valid ONLY for internal password management $encriptedPWD = $this->getPassword(); - if (strlen($encriptedPWD) == 32) { + if (strlen($encriptedPWD) === 32) { /* Update the old MD5 hash to the new bcrypt */ if ($encriptedPWD == md5($pwd)) { $this->password = $this->encryptPassword($pwd,$this->authentication); @@ -1522,4 +1522,4 @@ function hasRightWrap(&$db,$roleQuestion,$context=null) { $cx['checkPublicPrivateAttr']); } -} \ No newline at end of file +} From 5ded3c7f734c5f3b971f942a329332138855db4f Mon Sep 17 00:00:00 2001 From: tsein-bc <37125008+tsein-bc@users.noreply.github.com> Date: Sun, 4 May 2025 10:38:47 -0700 Subject: [PATCH 8/8] Adding code trackers table creation to postgres install script (#165) --- .../sql/postgres/testlink_create_tables.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install/sql/postgres/testlink_create_tables.sql b/install/sql/postgres/testlink_create_tables.sql index 309f54b5fc..48aa0677f6 100644 --- a/install/sql/postgres/testlink_create_tables.sql +++ b/install/sql/postgres/testlink_create_tables.sql @@ -804,6 +804,24 @@ CREATE TABLE /*prefix*/testproject_issuetracker ); +CREATE TABLE /*prefix*/codetrackers +( + "id" BIGSERIAL NOT NULL , + "name" VARCHAR(100) NOT NULL, + "type" INTEGER NOT NULL DEFAULT '0', + "cfg" TEXT, + PRIMARY KEY ("id") +); +CREATE UNIQUE INDEX /*prefix*/codetrackers_uidx1 ON /*prefix*/codetrackers ("name"); + + +CREATE TABLE /*prefix*/testproject_codetracker +( + "testproject_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/testprojects (id) ON DELETE CASCADE, + "codetracker_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/codetrackers (id) ON DELETE CASCADE, + PRIMARY KEY ("testproject_id") +); + CREATE TABLE /*prefix*/reqmgrsystems (