solve conflicts
This commit is contained in:
@@ -109,6 +109,7 @@ export default {
|
|||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
server = window.config.SYS_SERVER_API,
|
server = window.config.SYS_SERVER_API,
|
||||||
|
lang = window.config.SYS_LANG,
|
||||||
method = options.method || "get";
|
method = options.method || "get";
|
||||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
@@ -119,7 +120,8 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
|
"Accept-Language": lang
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -130,6 +132,7 @@ export default {
|
|||||||
url,
|
url,
|
||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
lang = window.config.SYS_LANG,
|
||||||
server = window.config.SYS_SERVER_API;
|
server = window.config.SYS_SERVER_API;
|
||||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
@@ -140,7 +143,8 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
|
"Accept-Language": lang
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -153,6 +157,7 @@ export default {
|
|||||||
url,
|
url,
|
||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
lang = window.config.SYS_LANG,
|
||||||
server = window.config.SYS_SERVER_API;
|
server = window.config.SYS_SERVER_API;
|
||||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
@@ -164,7 +169,8 @@ export default {
|
|||||||
headers: _.extend({
|
headers: _.extend({
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
|
"Accept-Language": lang
|
||||||
}, headers)
|
}, headers)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -200,6 +206,7 @@ export default {
|
|||||||
url,
|
url,
|
||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
lang = window.config.SYS_LANG,
|
||||||
server = window.config.SYS_SERVER_API;
|
server = window.config.SYS_SERVER_API;
|
||||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
@@ -209,7 +216,8 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
|
"Accept-Language": lang
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -222,6 +230,7 @@ export default {
|
|||||||
url,
|
url,
|
||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
lang = window.config.SYS_LANG,
|
||||||
server = window.config.SYS_SERVER_API;
|
server = window.config.SYS_SERVER_API;
|
||||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
@@ -261,7 +270,8 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
|
"Accept-Language": lang
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ export let cases = {
|
|||||||
window.config.SYS_WORKSPACE +
|
window.config.SYS_WORKSPACE +
|
||||||
'/home/' + data.APP_NUMBER + '/pending-tasks', {
|
'/home/' + data.APP_NUMBER + '/pending-tasks', {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
|
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||||
|
"Accept-Language": window.config.SYS_LANG
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -256,7 +257,8 @@ export let casesHeader = {
|
|||||||
window.config.SYS_WORKSPACE +
|
window.config.SYS_WORKSPACE +
|
||||||
'/home/counters', {
|
'/home/counters', {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
|
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||||
|
"Accept-Language": window.config.SYS_LANG
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ export let menu = {
|
|||||||
window.config.SYS_WORKSPACE +
|
window.config.SYS_WORKSPACE +
|
||||||
'/home/menu', {
|
'/home/menu', {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
|
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||||
|
"Accept-Language": window.config.SYS_LANG
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -20,7 +21,8 @@ export let menu = {
|
|||||||
window.config.SYS_WORKSPACE +
|
window.config.SYS_WORKSPACE +
|
||||||
'/home/tasks/counter', {
|
'/home/tasks/counter', {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
|
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||||
|
"Accept-Language": window.config.SYS_LANG
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
filterHeader: "STARTED_BY_ME",
|
filterHeader: "STARTED_BY_ME",
|
||||||
headers: [],
|
headers: [],
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -149,6 +149,15 @@ export default {
|
|||||||
duration: this.$i18n.t("ID_DURATION"),
|
duration: this.$i18n.t("ID_DURATION"),
|
||||||
actions: "",
|
actions: "",
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function(row) {
|
only: function(row) {
|
||||||
|
|||||||
@@ -169,6 +169,15 @@ export default {
|
|||||||
due_date: this.$i18n.t("ID_DUE_DATE"),
|
due_date: this.$i18n.t("ID_DUE_DATE"),
|
||||||
actions: this.$i18n.t("ID_ACTIONS")
|
actions: this.$i18n.t("ID_ACTIONS")
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single", // or 'multiple'
|
mode: "single", // or 'multiple'
|
||||||
only: function (row) {
|
only: function (row) {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -83,6 +83,7 @@ export default {
|
|||||||
options: {
|
options: {
|
||||||
filterable: false,
|
filterable: false,
|
||||||
headings: {
|
headings: {
|
||||||
|
detail: "",
|
||||||
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
||||||
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
||||||
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
||||||
@@ -100,6 +101,15 @@ export default {
|
|||||||
requestFunction(data) {
|
requestFunction(data) {
|
||||||
return this.$parent.$parent.getCasesForVueTable(data);
|
return this.$parent.$parent.getCasesForVueTable(data);
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
pmDateFormat: "Y-m-d H:i:s",
|
pmDateFormat: "Y-m-d H:i:s",
|
||||||
clickCount: 0,
|
clickCount: 0,
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
filterHeader: "STARTED",
|
filterHeader: "STARTED",
|
||||||
headers: [],
|
headers: [],
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -130,6 +130,15 @@ export default {
|
|||||||
duration: this.$i18n.t("ID_DURATION"),
|
duration: this.$i18n.t("ID_DURATION"),
|
||||||
actions: "",
|
actions: "",
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function(row) {
|
only: function(row) {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -112,6 +112,15 @@ export default {
|
|||||||
actions: "",
|
actions: "",
|
||||||
detail: "",
|
detail: "",
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function (row) {
|
only: function (row) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -95,6 +95,7 @@ export default {
|
|||||||
options: {
|
options: {
|
||||||
filterable: false,
|
filterable: false,
|
||||||
headings: {
|
headings: {
|
||||||
|
detail: "",
|
||||||
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
||||||
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
||||||
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
||||||
@@ -105,6 +106,15 @@ export default {
|
|||||||
priority: this.$i18n.t("ID_PRIORITY"),
|
priority: this.$i18n.t("ID_PRIORITY"),
|
||||||
actions: "",
|
actions: "",
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function (row) {
|
only: function (row) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
title: "New Case",
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
class: "btn-success",
|
class: "btn-success",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$refs["newRequest"].show();
|
this.$refs["newRequest"].show();
|
||||||
@@ -107,6 +107,15 @@ export default {
|
|||||||
actions: "",
|
actions: "",
|
||||||
detail: "",
|
detail: "",
|
||||||
},
|
},
|
||||||
|
texts: {
|
||||||
|
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
|
||||||
|
first: this.$i18n.t("ID_FIRST"),
|
||||||
|
last: this.$i18n.t("ID_LAST"),
|
||||||
|
filter: this.$i18n.t("ID_FILTER") + ":",
|
||||||
|
limit: this.$i18n.t("ID_RECORDS") + ":",
|
||||||
|
page: this.$i18n.t("ID_PAGE") + ":",
|
||||||
|
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
|
||||||
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function (row) {
|
only: function (row) {
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\unit\workflow\engine\src\ProcessMaker\Validation;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use ProcessMaker\Validation\SqlBlacklist;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class SqlBlacklistTest extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Property $sqlBlacklist
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
|
private $sqlBlacklist;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Property $content.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method setUp.
|
||||||
|
*/
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
$this->content = "";
|
||||||
|
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
|
||||||
|
if (file_exists($path)) {
|
||||||
|
$this->content = file_get_contents($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method tearDown.
|
||||||
|
*/
|
||||||
|
public function tearDown()
|
||||||
|
{
|
||||||
|
parent::tearDown();
|
||||||
|
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
|
||||||
|
if (file_exists($path)) {
|
||||||
|
file_put_contents($path, $this->content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test the getConfigValues method.
|
||||||
|
* @test
|
||||||
|
* @covers \ProcessMaker\Validation\SqlBlacklist::getConfigValues()
|
||||||
|
*/
|
||||||
|
public function it_should_test_getConfigValues_method()
|
||||||
|
{
|
||||||
|
$this->sqlBlacklist = new SqlBlacklist();
|
||||||
|
$result = $this->sqlBlacklist->getConfigValues();
|
||||||
|
|
||||||
|
//asserts
|
||||||
|
$this->assertArrayHasKey('tables', $result);
|
||||||
|
$this->assertArrayHasKey('statements', $result);
|
||||||
|
$this->assertArrayHasKey('pmtables', $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test the validate method when restricted system tables.
|
||||||
|
* @test
|
||||||
|
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
|
||||||
|
*/
|
||||||
|
public function it_should_test_validate_method_when_restricted_system_tables()
|
||||||
|
{
|
||||||
|
//assert exception
|
||||||
|
$this->expectException(Exception::class);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO APPLICATION (c1,c2,c3) values('', '', '')";
|
||||||
|
$this->sqlBlacklist = new SqlBlacklist($sql);
|
||||||
|
$this->sqlBlacklist->validate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test the validate method when restricted queries.
|
||||||
|
* @test
|
||||||
|
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
|
||||||
|
*/
|
||||||
|
public function it_should_test_validate_method_when_restricted_queries()
|
||||||
|
{
|
||||||
|
//assert exception
|
||||||
|
$this->expectException(Exception::class);
|
||||||
|
|
||||||
|
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
|
||||||
|
$content = ""
|
||||||
|
. "queries = \"INSERT|UPDATE|REPLACE|DELETE|SHOW\"\n\n"
|
||||||
|
. "pmtables = \"PMT_TEST\"\n";
|
||||||
|
file_put_contents($path, $content);
|
||||||
|
|
||||||
|
$sql = "SHOW tables";
|
||||||
|
$this->sqlBlacklist = new SqlBlacklist($sql);
|
||||||
|
$this->sqlBlacklist->validate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test the validate method when restricted pmtables.
|
||||||
|
* @test
|
||||||
|
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
|
||||||
|
*/
|
||||||
|
public function it_should_test_validate_method_when_restricted_pmtables()
|
||||||
|
{
|
||||||
|
//assert exception
|
||||||
|
$this->expectException(Exception::class);
|
||||||
|
|
||||||
|
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
|
||||||
|
$content = ""
|
||||||
|
. "queries = \"INSERT|UPDATE|REPLACE|DELETE|SHOW\"\n\n"
|
||||||
|
. "pmtables = \"PMT_TEST\"\n";
|
||||||
|
file_put_contents($path, $content);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO PMT_TEST (c1,c2,c3) values('', '', '')";
|
||||||
|
$this->sqlBlacklist = new SqlBlacklist($sql);
|
||||||
|
$this->sqlBlacklist->validate();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24077,6 +24077,12 @@ msgstr "Saving"
|
|||||||
msgid "Saving process"
|
msgid "Saving process"
|
||||||
msgstr "Saving process"
|
msgstr "Saving process"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_SCHEDULE_TIME
|
||||||
|
#: LABEL/ID_SCHEDULE_TIME
|
||||||
|
msgid "New cases scheduler"
|
||||||
|
msgstr "New cases scheduler"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_SCHEDULER_LIST
|
# LABEL/ID_SCHEDULER_LIST
|
||||||
#: LABEL/ID_SCHEDULER_LIST
|
#: LABEL/ID_SCHEDULER_LIST
|
||||||
|
|||||||
@@ -730,9 +730,9 @@ class InstallerModule extends Controller
|
|||||||
$dbText .= sprintf(" define ('DB_REPORT_PASS', '%s' );\n", $wfPass);
|
$dbText .= sprintf(" define ('DB_REPORT_PASS', '%s' );\n", $wfPass);
|
||||||
|
|
||||||
$requestFlag = $_REQUEST['PARTNER_FLAG'];
|
$requestFlag = $_REQUEST['PARTNER_FLAG'];
|
||||||
if (defined('PARTNER_FLAG') || isset($requestFlag])) {
|
if (defined('PARTNER_FLAG') || isset($requestFlag)) {
|
||||||
$dbText .= "\n";
|
$dbText .= "\n";
|
||||||
$dbText .= " (define('PARTNER_FLAG', " . (defined('PARTNER_FLAG') ? PARTNER_FLAG : isset(requestFlag)) ? $requestFlag : 'false') . ");\n";
|
$dbText .= " define ('PARTNER_FLAG', " . (defined('PARTNER_FLAG') ? PARTNER_FLAG : (isset($requestFlag) ? $requestFlag : 'false') ) . ");\n";
|
||||||
if (!empty($this->systemName)) {
|
if (!empty($this->systemName)) {
|
||||||
$dbText .= " define ('SYSTEM_NAME', '" . $this->systemName . "');\n";
|
$dbText .= " define ('SYSTEM_NAME', '" . $this->systemName . "');\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60925,6 +60925,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_SAVING_ENVIRONMENT_SETTINGS','en','Saving Environment Settings','2014-01-15') ,
|
( 'LABEL','ID_SAVING_ENVIRONMENT_SETTINGS','en','Saving Environment Settings','2014-01-15') ,
|
||||||
( 'LABEL','ID_SAVING_LABEL','en','Saving','2014-01-15') ,
|
( 'LABEL','ID_SAVING_LABEL','en','Saving','2014-01-15') ,
|
||||||
( 'LABEL','ID_SAVING_PROCESS','en','Saving process','2014-01-15') ,
|
( 'LABEL','ID_SAVING_PROCESS','en','Saving process','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_SCHEDULE_TIME','en','Schedule time','2021-05-02') ,
|
||||||
( 'LABEL','ID_SCHEDULER_LIST','en','New cases scheduler','2014-01-15') ,
|
( 'LABEL','ID_SCHEDULER_LIST','en','New cases scheduler','2014-01-15') ,
|
||||||
( 'LABEL','ID_SCHEDULER_LOG','en','Cases Scheduler Logs','2014-01-15') ,
|
( 'LABEL','ID_SCHEDULER_LOG','en','Cases Scheduler Logs','2014-01-15') ,
|
||||||
( 'LABEL','ID_SCHEDULER_SUCCESS_CHANGE_STATUS','en','Case Scheduler status has been changed correctly.','2014-01-15') ,
|
( 'LABEL','ID_SCHEDULER_SUCCESS_CHANGE_STATUS','en','Case Scheduler status has been changed correctly.','2014-01-15') ,
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class TimerEvent extends Api
|
|||||||
private $timerEvent;
|
private $timerEvent;
|
||||||
|
|
||||||
private $arrayFieldIso8601 = [
|
private $arrayFieldIso8601 = [
|
||||||
'tmrevn_next_run_date',
|
|
||||||
'tmrevn_last_run_date',
|
'tmrevn_last_run_date',
|
||||||
'tmrevn_last_execution_date'
|
'tmrevn_last_execution_date'
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user