Fix alert on blacklisted module when no message provided
This commit is contained in:
parent
31affd0f6c
commit
fb9a3881fa
3 changed files with 10 additions and 7 deletions
|
|
@ -308,7 +308,7 @@ if ($action == 'install' && $allowonlineinstall) {
|
|||
}
|
||||
*/
|
||||
|
||||
// Check if module is in the remote malware list
|
||||
// Check if module is in the remote malware blacklist (at URL DolibarrModules::URL_FOR_BLACKLISTED_MODULES)
|
||||
if (!$error) {
|
||||
if (GETPOST('checkforcompliance') == 'on') {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -2770,11 +2770,14 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
$arrayoflines = preg_split("/[\n,]/", $result['content']);
|
||||
foreach ($arrayoflines as $line) {
|
||||
$tmpfieldsofline = explode(';', $line);
|
||||
$modulekey = strtolower($tmpfieldsofline[0]);
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['name'] = $tmpfieldsofline[0];
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['id'] = (isset($tmpfieldsofline[1]) ? $tmpfieldsofline[1] : '');
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['signature'] = (isset($tmpfieldsofline[2]) ? $tmpfieldsofline[2] : '');
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['message'] = $langs->trans(empty($tmpfieldsofline[3]) ? 'WarningModuleAffiliatedToAReportedCompany' : $tmpfieldsofline[3]);
|
||||
$modulekey = strtolower(trim($tmpfieldsofline[0]));
|
||||
if (empty($modulekey)) {
|
||||
continue;
|
||||
}
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['name'] = trim($tmpfieldsofline[0]);
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['id'] = (isset($tmpfieldsofline[1]) ? trim($tmpfieldsofline[1]) : '');
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['signature'] = (isset($tmpfieldsofline[2]) ? trim($tmpfieldsofline[2]) : '');
|
||||
$conf->cache['noncompliantmodules'][$modulekey]['message'] = $langs->trans(empty(isset($tmpfieldsofline[3]) ? trim($tmpfieldsofline[3]) : '') ? 'WarningModuleAffiliatedToAReportedCompany' : trim($tmpfieldsofline[3]));
|
||||
if (!empty($tmpfieldsofline[4])) {
|
||||
$message2 = $langs->trans("WarningModuleAffiliatedToAPiratPlatform", '{s}');
|
||||
$listofillegalurl = '';
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ WarningReadBankAlsoAllowedIfUserHasPermission=Warning, reading bank account is a
|
|||
WarningNoDataTransferedInAccountancyYet=Please note, there is no data in the accounting table. Please transfer your data recorded in the application to the accounting section or change the calculation mode to analyze the data recorded outside of accounting.
|
||||
WarningChangingThisMayBreakStopTaskScheduler=Warning, changing this value may disable the scheduler
|
||||
WarningAmountOfFileDiffersFromSumOfLines=Warning, amount of file (%s) differs from the sum of lines (%s)
|
||||
WarningModuleAffiliatedToAReportedCompany=Warning, this module has been reported to the Dolibarr foundation as being published by a company using illegal practices (non-compliance with the rules for using the Dolibarr brand, collecting your data without your consent or deploying malware).
|
||||
WarningModuleAffiliatedToAReportedCompany=Warning, this module has been reported to the Dolibarr foundation as being published by a company using illegal practices (non-compliance with the rules for using the Dolibarr brand, GPL license violation, collecting data without your consent OR deploying malware).
|
||||
WarningModuleAffiliatedToAPiratPlatform=Be careful when getting a module (paid or free) from a suspicious non official platform like %s
|
||||
WarningDNSServerNotAvailable=Warning, DNS server not available
|
||||
WarningSecureKeyNotSet=The value fo the securekey must not be empty
|
||||
|
|
|
|||
Loading…
Reference in a new issue