From 6d3118d9e9d0f2915dd9dd89fae8ab55197042fa Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 8 Jun 2022 13:24:29 +0200 Subject: [PATCH 01/10] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20(eg.=20notifications)=20using=20GSuite=20SMTP=20and=20OAu?= =?UTF-8?q?th=20(fix=20config=20error=20message)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dictionaries/cs.dictionary.itop.ui.php | 2 + dictionaries/da.dictionary.itop.ui.php | 2 + dictionaries/de.dictionary.itop.ui.php | 2 + dictionaries/en.dictionary.itop.ui.php | 2 + dictionaries/es_cr.dictionary.itop.ui.php | 2 + dictionaries/fr.dictionary.itop.ui.php | 2 + dictionaries/hu.dictionary.itop.ui.php | 2 + dictionaries/it.dictionary.itop.ui.php | 2 + dictionaries/ja.dictionary.itop.ui.php | 2 + dictionaries/nl.dictionary.itop.ui.php | 2 + dictionaries/pt_br.dictionary.itop.ui.php | 2 + dictionaries/ru.dictionary.itop.ui.php | 2 + dictionaries/sk.dictionary.itop.ui.php | 2 + dictionaries/tr.dictionary.itop.ui.php | 2 + dictionaries/zh_cn.dictionary.itop.ui.php | 2 + .../OAuth/OAuthClientProviderFactory.php | 62 +++++++++++++++---- 16 files changed, 80 insertions(+), 12 deletions(-) diff --git a/dictionaries/cs.dictionary.itop.ui.php b/dictionaries/cs.dictionary.itop.ui.php index 5a9651419..7d91469f9 100755 --- a/dictionaries/cs.dictionary.itop.ui.php +++ b/dictionaries/cs.dictionary.itop.ui.php @@ -466,6 +466,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Množství', 'UI:GroupBy:Count+' => 'Množství prvků', 'UI:CountOfObjects' => 'Počet objektů odpovídajícíh ktritériím: %1$d', diff --git a/dictionaries/da.dictionary.itop.ui.php b/dictionaries/da.dictionary.itop.ui.php index aa2c546d5..945a1fa12 100644 --- a/dictionaries/da.dictionary.itop.ui.php +++ b/dictionaries/da.dictionary.itop.ui.php @@ -453,6 +453,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Antal', 'UI:GroupBy:Count+' => 'Antal af elementer', 'UI:CountOfObjects' => '%1$d objekter opfylder kriteriet.', diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index 1ef51b3b5..21193745a 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -452,6 +452,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'UI:Error:MaintenanceTitle' => 'Wartung', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Anzahl', 'UI:GroupBy:Count+' => 'Anzahl der Elemente', 'UI:CountOfObjects' => '%1$d Objekte, die das Kriterium erfüllen.', diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php index 18420b2d8..b6ddfcf7f 100644 --- a/dictionaries/en.dictionary.itop.ui.php +++ b/dictionaries/en.dictionary.itop.ui.php @@ -468,6 +468,8 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:Error:MaintenanceTitle' => 'Maintenance', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)', + 'UI:GroupBy:Count' => 'Count', 'UI:GroupBy:Count+' => 'Number of elements', 'UI:CountOfObjects' => '%1$d objects matching the criteria.', diff --git a/dictionaries/es_cr.dictionary.itop.ui.php b/dictionaries/es_cr.dictionary.itop.ui.php index b24fd05fb..c940bb277 100644 --- a/dictionaries/es_cr.dictionary.itop.ui.php +++ b/dictionaries/es_cr.dictionary.itop.ui.php @@ -465,6 +465,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array( 'UI:Error:MaintenanceTitle' => 'Mantenimiento', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Cuenta', 'UI:GroupBy:Count+' => 'Número de Elementos', 'UI:CountOfObjects' => '%1$d Elementos cumplen Criterio.', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 344c75b98..c39162895 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -451,6 +451,8 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:Error:MaintenanceTitle' => 'Maintenance', 'UI:Error:InvalidToken' => 'Erreur: l\'opération a déjà été effectuée (CSRF token not found)', + 'UI:Error:SMTP:UnknownVendor' => 'Le provider SMTP Oauth 2.0 %1$s n\'existe pas', + 'UI:GroupBy:Count' => 'Nombre', 'UI:GroupBy:Count+' => 'Nombre d\'éléments', 'UI:CountOfObjects' => '%1$d objets correspondants aux critères.', diff --git a/dictionaries/hu.dictionary.itop.ui.php b/dictionaries/hu.dictionary.itop.ui.php index b7b048515..8c8d2d0a6 100755 --- a/dictionaries/hu.dictionary.itop.ui.php +++ b/dictionaries/hu.dictionary.itop.ui.php @@ -451,6 +451,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Számossága', 'UI:GroupBy:Count+' => '', 'UI:CountOfObjects' => '%1$d darab objektum felel meg a kritériumoknak.', diff --git a/dictionaries/it.dictionary.itop.ui.php b/dictionaries/it.dictionary.itop.ui.php index f1a4f99c0..010995b19 100644 --- a/dictionaries/it.dictionary.itop.ui.php +++ b/dictionaries/it.dictionary.itop.ui.php @@ -464,6 +464,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Conteggio', 'UI:GroupBy:Count+' => '', 'UI:CountOfObjects' => '%1$d oggetti corrispondenti ai criteri.', diff --git a/dictionaries/ja.dictionary.itop.ui.php b/dictionaries/ja.dictionary.itop.ui.php index e30db1132..ec58e1697 100644 --- a/dictionaries/ja.dictionary.itop.ui.php +++ b/dictionaries/ja.dictionary.itop.ui.php @@ -451,6 +451,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'カウント', 'UI:GroupBy:Count+' => '要素数', 'UI:CountOfObjects' => '%1$d 個のオブジェクトが条件にマッチしました。', diff --git a/dictionaries/nl.dictionary.itop.ui.php b/dictionaries/nl.dictionary.itop.ui.php index 3c269cb75..011056ed1 100644 --- a/dictionaries/nl.dictionary.itop.ui.php +++ b/dictionaries/nl.dictionary.itop.ui.php @@ -470,6 +470,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'UI:Error:MaintenanceTitle' => 'Onderhoud', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Aantal', 'UI:GroupBy:Count+' => 'Aantal objecten', 'UI:CountOfObjects' => '%1$d objecten voldoen aan de criteria.', diff --git a/dictionaries/pt_br.dictionary.itop.ui.php b/dictionaries/pt_br.dictionary.itop.ui.php index c0d934124..6a51d4410 100644 --- a/dictionaries/pt_br.dictionary.itop.ui.php +++ b/dictionaries/pt_br.dictionary.itop.ui.php @@ -464,6 +464,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Número', 'UI:GroupBy:Count+' => 'Número de elementos', 'UI:CountOfObjects' => '%1$d objetos correspondem aos critérios.', diff --git a/dictionaries/ru.dictionary.itop.ui.php b/dictionaries/ru.dictionary.itop.ui.php index 1a10d0b74..c2b968113 100644 --- a/dictionaries/ru.dictionary.itop.ui.php +++ b/dictionaries/ru.dictionary.itop.ui.php @@ -443,6 +443,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'UI:Error:MaintenanceTitle' => 'Техническое обслуживание', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Количество', 'UI:GroupBy:Count+' => 'Количество элементов', 'UI:CountOfObjects' => '%1$d объектов соответствует критериям.', diff --git a/dictionaries/sk.dictionary.itop.ui.php b/dictionaries/sk.dictionary.itop.ui.php index 74290f499..854232778 100644 --- a/dictionaries/sk.dictionary.itop.ui.php +++ b/dictionaries/sk.dictionary.itop.ui.php @@ -451,6 +451,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Počet', 'UI:GroupBy:Count+' => '', 'UI:CountOfObjects' => '%1$d objekt/y/ov sa nezhoduje s kritériami.', diff --git a/dictionaries/tr.dictionary.itop.ui.php b/dictionaries/tr.dictionary.itop.ui.php index f87d86e6b..32a7015d3 100644 --- a/dictionaries/tr.dictionary.itop.ui.php +++ b/dictionaries/tr.dictionary.itop.ui.php @@ -465,6 +465,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'UI:Error:MaintenanceTitle' => 'Maintenance~~', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => 'Say', 'UI:GroupBy:Count+' => 'Eleman sayısı', 'UI:CountOfObjects' => 'Kritere uyan %1$d nesne bulundu.', diff --git a/dictionaries/zh_cn.dictionary.itop.ui.php b/dictionaries/zh_cn.dictionary.itop.ui.php index ee498ef97..fc2cbd798 100644 --- a/dictionaries/zh_cn.dictionary.itop.ui.php +++ b/dictionaries/zh_cn.dictionary.itop.ui.php @@ -464,6 +464,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'UI:Error:MaintenanceTitle' => '维护', 'UI:Error:InvalidToken' => 'Error: the requested operation has already been performed (CSRF token not found)~~', + 'UI:Error:SMTP:UnknownVendor' => 'OAuth SMTP provider %1$s does not exist (email_transport_smtp.oauth.provider)~~', + 'UI:GroupBy:Count' => '个数', 'UI:GroupBy:Count+' => '元素数量', 'UI:CountOfObjects' => '%1$d 个对象符合指定的条件.', diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php index 8ede0f6fe..d484b26ba 100644 --- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php +++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php @@ -2,47 +2,68 @@ namespace Combodo\iTop\Core\Authentication\Client\OAuth; +use CoreException; +use Dict; use GuzzleHttp\Client; use League\OAuth2\Client\Token\AccessTokenInterface; use MetaModel; -class OAuthClientProviderFactory { +class OAuthClientProviderFactory +{ + /** + * @return mixed + * @throws \CoreException + */ public static function getProviderForSMTP() { $sProviderVendor = MetaModel::GetConfig()->Get('email_transport_smtp.oauth.provider'); // email_transport_smtp.oauth.provider - $sProviderClass = "\Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProvider".$sProviderVendor; + $sProviderClass = self::getProviderClass($sProviderVendor); $aProviderVendorParams = [ 'clientId' => MetaModel::GetConfig()->Get('email_transport_smtp.oauth.client_id'), // email_transport_smtp.oauth.client_id 'clientSecret' => MetaModel::GetConfig()->Get('email_transport_smtp.oauth.client_secret'),// email_transport_smtp.oauth.client_secret 'redirectUri' => $sProviderClass::GetRedirectUri(), - 'scope' => $sProviderClass::GetRequiredSMTPScope() + 'scope' => $sProviderClass::GetRequiredSMTPScope(), ]; $aAccessTokenParams = [ "access_token" => MetaModel::GetConfig()->Get('email_transport_smtp.oauth.access_token'), // email_transport_smtp.oauth.access_token "refresh_token" => MetaModel::GetConfig()->Get('email_transport_smtp.oauth.refresh_token'), // email_transport_smtp.oauth.refresh_token - 'scope' => $sProviderClass::GetRequiredSMTPScope() + 'scope' => $sProviderClass::GetRequiredSMTPScope(), ]; $aCollaborators = [ 'httpClient' => new Client(['verify' => false]), ]; - + return new $sProviderClass($aProviderVendorParams, $aCollaborators, $aAccessTokenParams); } - public static function getVendorProvider($sProviderVendor, $sClientId, $sClientSecret, $sScope, $aAdditional){ + + /** + * @param $sProviderVendor + * @param $sClientId + * @param $sClientSecret + * @param $sScope + * @param $aAdditional + * + * @return mixed + * @throws \CoreException + */ + public static function getVendorProvider($sProviderVendor, $sClientId, $sClientSecret, $sScope, $aAdditional) + { $sRedirectUrl = OAuthClientProviderAbstract::GetRedirectUri(); - $sProviderClass = "\Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProvider".$sProviderVendor; + $sProviderClass = self::getProviderClass($sProviderVendor); $aCollaborators = [ 'httpClient' => new Client(['verify' => false]), ]; return new $sProviderClass(array_merge(['clientId' => $sClientId, 'clientSecret' => $sClientSecret, 'redirectUri' => $sRedirectUrl, 'scope' => $sScope], $aAdditional), $aCollaborators); } - - public static function getVendorProviderForAccessUrl($sProviderVendor, $sClientId, $sClientSecret, $sScope, $aAdditional){ + + public static function getVendorProviderForAccessUrl($sProviderVendor, $sClientId, $sClientSecret, $sScope, $aAdditional) + { $oProvider = static::getVendorProvider($sProviderVendor, $sClientId, $sClientSecret, $sScope, $aAdditional); + return $oProvider->GetVendorProvider()->getAuthorizationUrl([ 'scope' => [ - $sScope + $sScope, ], ]); } @@ -58,16 +79,33 @@ class OAuthClientProviderFactory { { return $oProvider->GetVendorProvider()->getAccessToken('authorization_code', ['code' => $sCode, 'scope' => $oProvider->GetScope()]); } - + public static function getConfFromRedirectUrl($sProviderVendor, $sClientId, $sClientSecret, $sRedirectUrlQuery) { $sRedirectUrl = OAuthClientProviderAbstract::GetRedirectUri(); - $sProviderClass = "\Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProvider".$sProviderVendor; + $sProviderClass = self::getProviderClass($sProviderVendor); $aQuery = []; parse_str($sRedirectUrlQuery, $aQuery); $sCode = $aQuery['code']; $oProvider = new $sProviderClass(['clientId' => $sClientId, 'clientSecret' => $sClientSecret, 'redirectUri' => $sRedirectUrl]); + return $sProviderClass::getConfFromAccessToken($oProvider->GetVendorProvider()->getAccessToken('authorization_code', ['code' => $sCode]), $sClientId, $sClientSecret); } + /** + * @param $sProviderVendor + * + * @return string + * @throws \CoreException + */ + public static function getProviderClass($sProviderVendor): string + { + $sProviderClass = "\Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProvider".$sProviderVendor; + if (!class_exists($sProviderClass)) { + throw new CoreException(dict::Format('UI:Error:SMTP:UnknownVendor', $sProviderVendor)); + } + + return $sProviderClass; + } + } \ No newline at end of file From 409937647211f373e20c08aa36521a34bd986790 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 9 Jun 2022 11:40:13 +0200 Subject: [PATCH 02/10] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Defer=20the=20d?= =?UTF-8?q?eletion=20(expunge)=20to=20the=20end=20of=20connection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php b/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php index 1b0f7b721..1c261a5e7 100644 --- a/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php +++ b/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php @@ -92,7 +92,7 @@ class Oauth extends Login while (true) { $sResponse = $this->_receive(30); - IssueLog::Debug("SMTP Oauth receiving $sResponse", static::LOG_CHANNEL); + IssueLog::Debug("SMTP Oauth receiving ".trim($sResponse), static::LOG_CHANNEL); if ($sResponse === '+') { // Send empty client response. From 16663797b27708dc95e8d7b1dc30fb57b204497f Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 13 Jun 2022 15:51:36 +0200 Subject: [PATCH 03/10] =?UTF-8?q?N=C2=B04642=20-=20Core=20Update=20:=20lim?= =?UTF-8?q?it=20the=20usage=20of=20this=20function=20to=20minor=20version?= =?UTF-8?q?=20-=20fix=20error=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/da.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/de.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/en.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/it.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php | 1 + datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php | 1 + 15 files changed, 15 insertions(+) diff --git a/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php index ee3034ecc..90da27b9a 100644 --- a/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php index ab703a9ab..6236412e2 100644 --- a/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php index 7f801244b..84370d523 100644 --- a/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'iTopUpdate:Error:InvalidToken' => 'Ungültiges Token', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade fehlgeschlagen', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'Die maximale Größe für Dateiuploads ist zu klein. Bitte die PHP-Konfiguration anpassen.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Wiederherstellung der Anwendung aus archivierten Daten \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Wiederherstellung der Datenbank aus \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php index 4cc013a27..63b9b1854 100644 --- a/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('EN US', 'English', 'English', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php index 5ffe65d8d..64b7f3962 100644 --- a/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php @@ -104,6 +104,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array( 'iTopUpdate:Error:InvalidToken' => 'Token inválido', 'iTopUpdate:Error:UpdateFailed' => 'La actualización ha fallado', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'El archivo de actualización parece demasiado pequeño. Por favor cambie la configuración PHP.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Usted puede restaurar su aplicación desde el archivo \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Usted puede restaurar la base de datos desde \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php index fb80f2644..2caabb780 100644 --- a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'iTopUpdate:Error:InvalidToken' => 'Information manquante', 'iTopUpdate:Error:UpdateFailed' => 'La mise à jour a échoué', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'La taille maximale de chargement de fichier semble trop petite pour faire la mise à jour. Veuillez changer la configuration de PHP.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => 'Vous essayez d\'installer %1$s via la mise à jour de l\'application, ce qui n\'est pas possible sur %2$s. Vous devez lancer la procédure d\'installation standard.', 'iTopUpdate:UI:RestoreArchive' => 'Vous pouvez restaurer l\'application depuis \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Vous pouvez restaurer la base de données depuis \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php index bf5ac0674..3bd9f92df 100644 --- a/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php index e7fb3489d..5443b0609 100644 --- a/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php index 865cfb513..d26b324b1 100644 --- a/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php index 4e15021e2..220010a98 100644 --- a/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php @@ -105,6 +105,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'iTopUpdate:Error:InvalidToken' => 'Token ongeldig', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade mislukt', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'De maximale bestandsgrootte voor uploads lijkt te klein voor deze update. Controleer de PHP-configuratie.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Je kan de toepassing herstellen via het archief "%1$s"', 'iTopUpdate:UI:RestoreBackup' => 'Je kan de database herstellen via het archief "%1$s"', diff --git a/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php index 1d6ead8f8..07ed6a385 100644 --- a/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php index c93bd7d25..35c489f5c 100644 --- a/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php @@ -91,6 +91,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'iTopUpdate:Error:InvalidToken' => 'Недопустимый токен', 'iTopUpdate:Error:UpdateFailed' => 'Ошибка обновления', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'Максимальный размер загрузки недостаточный для обновления. Пожалуйста, измените конфигурацию PHP.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Вы можете восстановить приложение из архива \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Вы можете восстановить базу данных из резервной копии \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php index 25677f807..936ffd853 100644 --- a/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php index 041679a47..06d96bc33 100644 --- a/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php index 7553fd543..1f3ee867d 100644 --- a/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php @@ -103,6 +103,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'iTopUpdate:Error:InvalidToken' => '无效的token', 'iTopUpdate:Error:UpdateFailed' => '升级失败', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => '上传上限太小. 请调整 PHP 配置.', + 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => '您可以从归档文件 \'%1$s\' 还原应用程序', 'iTopUpdate:UI:RestoreBackup' => '您可以从 \'%1$s\' 还原数据库', From df5d514c286b21749f8366f3a8efd575afb96ccf Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 13 Jun 2022 15:59:25 +0200 Subject: [PATCH 04/10] =?UTF-8?q?N=C2=B04642=20-=20Core=20Update=20:=20lim?= =?UTF-8?q?it=20the=20usage=20of=20this=20function=20to=20minor=20version?= =?UTF-8?q?=20-=20fix=20error=20message=20(revert)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/da.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/de.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/en.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/it.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php | 1 - datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php | 1 - 15 files changed, 15 deletions(-) diff --git a/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php index 90da27b9a..ee3034ecc 100644 --- a/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/cs.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php index 6236412e2..ab703a9ab 100644 --- a/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/da.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php index 84370d523..7f801244b 100644 --- a/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/de.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'iTopUpdate:Error:InvalidToken' => 'Ungültiges Token', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade fehlgeschlagen', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'Die maximale Größe für Dateiuploads ist zu klein. Bitte die PHP-Konfiguration anpassen.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Wiederherstellung der Anwendung aus archivierten Daten \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Wiederherstellung der Datenbank aus \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php index 63b9b1854..4cc013a27 100644 --- a/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/en.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('EN US', 'English', 'English', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php index 64b7f3962..5ffe65d8d 100644 --- a/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/es_cr.dict.itop-core-update.php @@ -104,7 +104,6 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array( 'iTopUpdate:Error:InvalidToken' => 'Token inválido', 'iTopUpdate:Error:UpdateFailed' => 'La actualización ha fallado', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'El archivo de actualización parece demasiado pequeño. Por favor cambie la configuración PHP.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Usted puede restaurar su aplicación desde el archivo \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Usted puede restaurar la base de datos desde \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php index 2caabb780..fb80f2644 100644 --- a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('FR FR', 'French', 'Français', array( 'iTopUpdate:Error:InvalidToken' => 'Information manquante', 'iTopUpdate:Error:UpdateFailed' => 'La mise à jour a échoué', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'La taille maximale de chargement de fichier semble trop petite pour faire la mise à jour. Veuillez changer la configuration de PHP.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => 'Vous essayez d\'installer %1$s via la mise à jour de l\'application, ce qui n\'est pas possible sur %2$s. Vous devez lancer la procédure d\'installation standard.', 'iTopUpdate:UI:RestoreArchive' => 'Vous pouvez restaurer l\'application depuis \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Vous pouvez restaurer la base de données depuis \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php index 3bd9f92df..bf5ac0674 100644 --- a/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/hu.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php index 5443b0609..e7fb3489d 100644 --- a/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/it.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php index d26b324b1..865cfb513 100644 --- a/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/ja.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php index 220010a98..4e15021e2 100644 --- a/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/nl.dict.itop-core-update.php @@ -105,7 +105,6 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'iTopUpdate:Error:InvalidToken' => 'Token ongeldig', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade mislukt', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'De maximale bestandsgrootte voor uploads lijkt te klein voor deze update. Controleer de PHP-configuratie.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Je kan de toepassing herstellen via het archief "%1$s"', 'iTopUpdate:UI:RestoreBackup' => 'Je kan de database herstellen via het archief "%1$s"', diff --git a/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php index 07ed6a385..1d6ead8f8 100644 --- a/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php index 35c489f5c..c93bd7d25 100644 --- a/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/ru.dict.itop-core-update.php @@ -91,7 +91,6 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'iTopUpdate:Error:InvalidToken' => 'Недопустимый токен', 'iTopUpdate:Error:UpdateFailed' => 'Ошибка обновления', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'Максимальный размер загрузки недостаточный для обновления. Пожалуйста, измените конфигурацию PHP.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'Вы можете восстановить приложение из архива \'%1$s\'', 'iTopUpdate:UI:RestoreBackup' => 'Вы можете восстановить базу данных из резервной копии \'%1$s\'', diff --git a/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php index 936ffd853..25677f807 100644 --- a/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/sk.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php index 06d96bc33..041679a47 100644 --- a/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/tr.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'iTopUpdate:Error:InvalidToken' => 'Invalid token~~', 'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~', 'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~', diff --git a/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php index 1f3ee867d..7553fd543 100644 --- a/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/zh_cn.dict.itop-core-update.php @@ -103,7 +103,6 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'iTopUpdate:Error:InvalidToken' => '无效的token', 'iTopUpdate:Error:UpdateFailed' => '升级失败', 'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => '上传上限太小. 请调整 PHP 配置.', - 'iTopUpdate:Error:PackageVersionNotCompatible' => '%1$s cannot be installed automatically on %2$s. Please perform upgrade manually.~~', 'iTopUpdate:UI:RestoreArchive' => '您可以从归档文件 \'%1$s\' 还原应用程序', 'iTopUpdate:UI:RestoreBackup' => '您可以从 \'%1$s\' 还原数据库', From 352f7c867565a61befc78ce95f0b4ba39aeacde0 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 14 Jun 2022 09:47:13 +0200 Subject: [PATCH 05/10] Update guzzlehttp/guzzle --- composer.lock | 58 ++++++++++++++++--- lib/autoload.php | 5 ++ lib/composer/ClassLoader.php | 2 +- lib/composer/InstalledVersions.php | 2 + lib/composer/autoload_classmap.php | 2 +- lib/composer/autoload_files.php | 10 ++-- lib/composer/autoload_namespaces.php | 2 +- lib/composer/autoload_psr4.php | 2 +- lib/composer/autoload_real.php | 30 ++++------ lib/composer/autoload_static.php | 8 +-- lib/composer/include_paths.php | 2 +- lib/composer/installed.json | 58 ++++++++++++++++--- lib/composer/installed.php | 10 ++-- lib/guzzlehttp/guzzle/CHANGELOG.md | 9 +++ lib/guzzlehttp/guzzle/LICENSE | 10 +++- lib/guzzlehttp/guzzle/README.md | 23 ++++---- lib/guzzlehttp/guzzle/composer.json | 30 ++++++++++ .../guzzle/src/Cookie/CookieJar.php | 5 ++ .../guzzle/src/Cookie/SetCookie.php | 11 +++- .../guzzle/src/RedirectMiddleware.php | 38 ++++++++++-- 20 files changed, 246 insertions(+), 71 deletions(-) diff --git a/composer.lock b/composer.lock index f69883a43..0f7cfad12 100644 --- a/composer.lock +++ b/composer.lock @@ -311,16 +311,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "6.5.7", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "724562fa861e21a4071c652c8a159934e4f05592" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/724562fa861e21a4071c652c8a159934e4f05592", + "reference": "724562fa861e21a4071c652c8a159934e4f05592", "shasum": "" }, "require": { @@ -357,10 +357,40 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", @@ -376,9 +406,23 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/6.5.7" }, - "time": "2020-06-16T21:01:06+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-06-09T21:36:50+00:00" }, { "name": "guzzlehttp/promises", @@ -4674,5 +4718,5 @@ "platform-overrides": { "php": "7.0.8" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/lib/autoload.php b/lib/autoload.php index 79c1600b5..64168f99a 100644 --- a/lib/autoload.php +++ b/lib/autoload.php @@ -2,6 +2,11 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + exit(1); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b::getLoader(); diff --git a/lib/composer/ClassLoader.php b/lib/composer/ClassLoader.php index 0cd6055d1..afef3fa2a 100644 --- a/lib/composer/ClassLoader.php +++ b/lib/composer/ClassLoader.php @@ -149,7 +149,7 @@ class ClassLoader /** * @return string[] Array of classname => path - * @psalm-var array + * @psalm-return array */ public function getClassMap() { diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php index d50e0c9fc..41bc143c1 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -21,6 +21,8 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index c63cfe237..704d9f730 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php index 7be757bea..ae02e5199 100644 --- a/lib/composer/autoload_files.php +++ b/lib/composer/autoload_files.php @@ -2,25 +2,25 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php', - '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '7e9bd612cc444b3eed788ebbe46263a0' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', + 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', ); diff --git a/lib/composer/autoload_namespaces.php b/lib/composer/autoload_namespaces.php index d12922d08..e6117c750 100644 --- a/lib/composer/autoload_namespaces.php +++ b/lib/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php index ca8b4b9f6..651c9f0c1 100644 --- a/lib/composer/autoload_psr4.php +++ b/lib/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_real.php b/lib/composer/autoload_real.php index 661cd2543..752e35fbd 100644 --- a/lib/composer/autoload_real.php +++ b/lib/composer/autoload_real.php @@ -25,33 +25,20 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); set_include_path(implode(PATH_SEPARATOR, $includePaths)); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::getInitializer($loader)); - } else { - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } + $includeFiles = \Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files; foreach ($includeFiles as $fileIdentifier => $file) { composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file); } @@ -60,11 +47,16 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b } } +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ function composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; } } diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 2b50f81a9..021b67052 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -8,21 +8,21 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php', - '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - 'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', + 'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', ); diff --git a/lib/composer/include_paths.php b/lib/composer/include_paths.php index d4fb96718..af33c1491 100644 --- a/lib/composer/include_paths.php +++ b/lib/composer/include_paths.php @@ -2,7 +2,7 @@ // include_paths.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/installed.json b/lib/composer/installed.json index 1a13c97fc..2df7d7302 100644 --- a/lib/composer/installed.json +++ b/lib/composer/installed.json @@ -320,17 +320,17 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", - "version_normalized": "6.5.5.0", + "version": "6.5.7", + "version_normalized": "6.5.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "724562fa861e21a4071c652c8a159934e4f05592" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/724562fa861e21a4071c652c8a159934e4f05592", + "reference": "724562fa861e21a4071c652c8a159934e4f05592", "shasum": "" }, "require": { @@ -348,7 +348,7 @@ "suggest": { "psr/log": "Required for using the Log middleware" }, - "time": "2020-06-16T21:01:06+00:00", + "time": "2022-06-09T21:36:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -369,10 +369,40 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", @@ -388,8 +418,22 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/6.5.7" }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], "install-path": "../guzzlehttp/guzzle" }, { diff --git a/lib/composer/installed.php b/lib/composer/installed.php index 64f2ae5ec..3fcb76991 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'caf939bf5835556317f457cd33e666e2de1d7815', + 'reference' => 'df5d514c286b21749f8366f3a8efd575afb96ccf', 'name' => '__root__', 'dev' => true, ), @@ -16,7 +16,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'caf939bf5835556317f457cd33e666e2de1d7815', + 'reference' => 'df5d514c286b21749f8366f3a8efd575afb96ccf', 'dev_requirement' => false, ), 'combodo/tcpdf' => array( @@ -71,12 +71,12 @@ 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '6.5.5', - 'version' => '6.5.5.0', + 'pretty_version' => '6.5.7', + 'version' => '6.5.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), - 'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e', + 'reference' => '724562fa861e21a4071c652c8a159934e4f05592', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( diff --git a/lib/guzzlehttp/guzzle/CHANGELOG.md b/lib/guzzlehttp/guzzle/CHANGELOG.md index 464cf1c50..cd3db22d8 100644 --- a/lib/guzzlehttp/guzzle/CHANGELOG.md +++ b/lib/guzzlehttp/guzzle/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 6.5.7 - 2022-06-09 + +* Fix failure to strip Authorization header on HTTP downgrade +* Fix failure to strip the Cookie header on change in host or HTTP downgrade + +## 6.5.6 - 2022-05-25 + +* Fix cross-domain cookie leakage + ## 6.5.5 - 2020-06-16 * Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678) diff --git a/lib/guzzlehttp/guzzle/LICENSE b/lib/guzzlehttp/guzzle/LICENSE index 50a177b03..fd2375d88 100644 --- a/lib/guzzlehttp/guzzle/LICENSE +++ b/lib/guzzlehttp/guzzle/LICENSE @@ -1,4 +1,12 @@ -Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling +The MIT License (MIT) + +Copyright (c) 2011 Michael Dowling +Copyright (c) 2012 Jeremy Lindblom +Copyright (c) 2014 Graham Campbell +Copyright (c) 2015 Márk Sági-Kazár +Copyright (c) 2015 Tobias Schultze +Copyright (c) 2016 Tobias Nyholm +Copyright (c) 2016 George Mponos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/guzzlehttp/guzzle/README.md b/lib/guzzlehttp/guzzle/README.md index 5fdb6c5f4..00d2066e9 100644 --- a/lib/guzzlehttp/guzzle/README.md +++ b/lib/guzzlehttp/guzzle/README.md @@ -2,7 +2,7 @@ Guzzle, PHP HTTP client ======================= [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) -[![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle) +[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and @@ -74,17 +74,20 @@ composer update ## Version Guidance -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | -| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | -| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | +| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | +| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | +| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.2 | [guzzle-3-repo]: https://github.com/guzzle/guzzle3 [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 -[guzzle-6-repo]: https://github.com/guzzle/guzzle +[guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5 +[guzzle-7-repo]: https://github.com/guzzle/guzzle [guzzle-3-docs]: http://guzzle3.readthedocs.org -[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ -[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ +[guzzle-5-docs]: http://docs.guzzlephp.org/en/5.3/ +[guzzle-6-docs]: http://docs.guzzlephp.org/en/6.5/ +[guzzle-7-docs]: http://docs.guzzlephp.org/en/latest/ diff --git a/lib/guzzlehttp/guzzle/composer.json b/lib/guzzlehttp/guzzle/composer.json index c01864f01..b9cb386a6 100644 --- a/lib/guzzlehttp/guzzle/composer.json +++ b/lib/guzzlehttp/guzzle/composer.json @@ -14,10 +14,40 @@ "homepage": "http://guzzlephp.org/", "license": "MIT", "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "require": { diff --git a/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php index 38f98ad7c..394df3a7c 100644 --- a/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -240,6 +240,11 @@ class CookieJar implements CookieJarInterface if (0 !== strpos($sc->getPath(), '/')) { $sc->setPath($this->getCookiePathFromRequest($request)); } + if (!$sc->matchesDomain($request->getUri()->getHost())) { + continue; + } + // Note: At this point `$sc->getDomain()` being a public suffix should + // be rejected, but we don't want to pull in the full PSL dependency. $this->setCookie($sc); } } diff --git a/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php index 3d776a70b..55f6901a7 100644 --- a/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -333,12 +333,19 @@ class SetCookie */ public function matchesDomain($domain) { + $cookieDomain = $this->getDomain(); + if (null === $cookieDomain) { + return true; + } + // Remove the leading '.' as per spec in RFC 6265. // http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = ltrim($this->getDomain(), '.'); + $cookieDomain = ltrim(strtolower($cookieDomain), '.'); + + $domain = strtolower($domain); // Domain not set or exact match. - if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { + if ('' === $cookieDomain || $domain === $cookieDomain) { return true; } diff --git a/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php b/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php index e4644b7ac..fd86c60a7 100644 --- a/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -141,7 +141,7 @@ class RedirectMiddleware } /** - * Check for too many redirects + * Check for too many redirects. * * @return void * @@ -190,7 +190,7 @@ class RedirectMiddleware $modify['body'] = ''; } - $uri = $this->redirectUri($request, $response, $protocols); + $uri = self::redirectUri($request, $response, $protocols); if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); @@ -210,16 +210,42 @@ class RedirectMiddleware $modify['remove_headers'][] = 'Referer'; } - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + // Remove Authorization and Cookie headers if required. + if (self::shouldStripSensitiveHeaders($request->getUri(), $modify['uri'])) { $modify['remove_headers'][] = 'Authorization'; + $modify['remove_headers'][] = 'Cookie'; } return Psr7\modify_request($request, $modify); } /** - * Set the appropriate URL on the request based on the location header + * Determine if we should strip sensitive headers from the request. + * + * We return true if either of the following conditions are true: + * + * 1. the host is different; + * 2. the scheme has changed, and now is non-https. + * + * @return bool + */ + private static function shouldStripSensitiveHeaders( + UriInterface $originalUri, + UriInterface $modifiedUri + ) { + if (strcasecmp($originalUri->getHost(), $modifiedUri->getHost()) !== 0) { + return true; + } + + if ($originalUri->getScheme() !== $modifiedUri->getScheme() && 'https' !== $modifiedUri->getScheme()) { + return true; + } + + return false; + } + + /** + * Set the appropriate URL on the request based on the location header. * * @param RequestInterface $request * @param ResponseInterface $response @@ -227,7 +253,7 @@ class RedirectMiddleware * * @return UriInterface */ - private function redirectUri( + private static function redirectUri( RequestInterface $request, ResponseInterface $response, array $protocols From ca98066d68bf1f791b76e7ef1b8a736d284364fb Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Tue, 14 Jun 2022 10:54:25 +0200 Subject: [PATCH 06/10] =?UTF-8?q?N=C2=B05037=20-=20Setup:=20Add=20disclaim?= =?UTF-8?q?er=20about=20collected=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datamodel.itop-hub-connector.xml | 11 +++--- setup/wizardsteps.class.inc.php | 38 ++++++++++++++++++- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml b/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml index 4f5406bde..0e1097ca0 100644 --- a/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml +++ b/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml @@ -15,12 +15,13 @@ https://www.itophub.io - /my-instances/landing-from-remote - /stateless-remote-itop/landing-from-remote-stateless - /api/messages - /api/messages/mark-all-as-read - /messages + /my-instances/landing-from-remote + /stateless-remote-itop/landing-from-remote-stateless + /api/messages + /api/messages/mark-all-as-read + /messages ../pages/exec.php?exec_module=itop-hub-connector&exec_page=launch.php&target=inform_after_setup + https://www.itophub.io/page/data-privacy diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index 362af67a0..061701227 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -2143,6 +2143,13 @@ class WizStepSummary extends WizardStep return array('class' => 'WizStepDone', 'state' => ''); } + private function NeedsRgpdConsent() + { + $sMode = $this->oWizard->GetParameter('install_mode'); + $aSelectedModules = json_decode($this->oWizard->GetParameter('selected_modules'), true); + return $sMode == 'install' && !SetupUtils::IsProductVersion($aSelectedModules); + } + public function Display(WebPage $oPage) { $oPage->add_style( @@ -2296,6 +2303,34 @@ CSS $oPage->add(''); // progress_content $oPage->add(''); + if ($this->NeedsRgpdConsent()) { + $oConfig = new Config(utils::GetConfigFilePath()); + $oProductionEnv = new RunTimeEnvironment('production'); + $oProductionEnv->InitDataModel($oConfig, true); + $sRgpdUrl = $oConfig->GetModuleSetting('itop-hub-connector', 'rgpd_url', ''); + $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR). +By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. +This data remains anonymous until it is associated to a user account on iTop Hub. +List of collected data available in our Data privacy section.

More informations here

'); + $oPage->add(''); + $oPage->add(''); + $oPage->add('
'); + $oPage->add_ready_script('$("#rgpd_consent").bind("click change", function() { WizardUpdateButtons(); });'); + } + $oPage->add_script( + <<add(''); @@ -2436,6 +2471,7 @@ JS WizardUpdateButtons(); $('#setup_msg').html('$sMessage'); $('#progress').progression( {Current:{$aRes['percentage-completed']}, Maximum: 100} ); + $("#rgpd_message").hide(); //$("#percentage").html('{$aRes['percentage-completed']} % completed
{$aRes['next-step-label']}'); ExecuteStep('{$aRes['next-step']}'); @@ -2475,7 +2511,7 @@ EOF */ public function JSCanMoveForward() { - return 'return (($("#wiz_form").data("installation_status") === "not started") || ($("#wiz_form").data("installation_status") === "completed"));'; + return 'return (($("#wiz_form").data("installation_status") === "not started" && isRgpdConsentOk()) || ($("#wiz_form").data("installation_status") === "completed"));'; } /** From b3ea1050ebddebb07c6f7f8c7f11ed69d5dda1c0 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Tue, 14 Jun 2022 10:54:25 +0200 Subject: [PATCH 07/10] =?UTF-8?q?N=C2=B05037=20-=20Setup:=20Add=20disclaim?= =?UTF-8?q?er=20about=20collected=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/wizardsteps.class.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index 061701227..e576bc053 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -2304,14 +2304,10 @@ CSS $oPage->add(''); if ($this->NeedsRgpdConsent()) { - $oConfig = new Config(utils::GetConfigFilePath()); - $oProductionEnv = new RunTimeEnvironment('production'); - $oProductionEnv->InitDataModel($oConfig, true); - $sRgpdUrl = $oConfig->GetModuleSetting('itop-hub-connector', 'rgpd_url', ''); $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR). By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. This data remains anonymous until it is associated to a user account on iTop Hub. -List of collected data available in our Data privacy section.

More informations here

'); +List of collected data available in our Data privacy section.

More informations here

'); $oPage->add(''); $oPage->add(''); $oPage->add('
'); From 617b6b991f5991f37361ba846215f19ba59660f2 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Tue, 14 Jun 2022 14:33:35 +0200 Subject: [PATCH 08/10] =?UTF-8?q?N=C2=B05037=20-=20Setup:=20Add=20disclaim?= =?UTF-8?q?er=20about=20collected=20data=20flip=20modules=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/wizardsteps.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index e576bc053..f89893b9c 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -2147,7 +2147,7 @@ class WizStepSummary extends WizardStep { $sMode = $this->oWizard->GetParameter('install_mode'); $aSelectedModules = json_decode($this->oWizard->GetParameter('selected_modules'), true); - return $sMode == 'install' && !SetupUtils::IsProductVersion($aSelectedModules); + return $sMode == 'install' && !SetupUtils::IsProductVersion(array_flip($aSelectedModules)); } public function Display(WebPage $oPage) From 00e8c11ec2179494c50ea00c246ec2ebc4cad604 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Tue, 14 Jun 2022 17:18:34 +0200 Subject: [PATCH 09/10] =?UTF-8?q?N=C2=B05037=20-=20Setup:=20Add=20disclaim?= =?UTF-8?q?er=20about=20collected=20data=20change=20ui=20organization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/wizardsteps.class.inc.php | 70 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index f89893b9c..8b9fdc5a2 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -708,6 +708,13 @@ class WizStepLicense extends WizardStep return array('class' => 'WizStepDBParams', 'state' => ''); } + private function NeedsRgpdConsent() + { + $sMode = $this->oWizard->GetParameter('install_mode'); + $aModules = SetupUtils::AnalyzeInstallation($this->oWizard); + return $sMode == 'install' && !SetupUtils::IsProductVersion($aModules); + } + /** * @param WebPage $oPage */ @@ -741,8 +748,31 @@ EOF $oPage->add(''); $oPage->add(''); $sChecked = ($this->oWizard->GetParameter('accept_license', 'no') == 'yes') ? ' checked ' : ''; - $oPage->p(''); - $oPage->add_ready_script('$("#accept").bind("click change", function() { WizardUpdateButtons(); });'); + $oPage->p(''); + if ($this->NeedsRgpdConsent()) { + $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).

+By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. +This data remains anonymous until it is associated to a user account on iTop Hub.

+

List of collected data available in our Data privacy section.

'); + $oPage->add(''); + $oPage->add(''); + $oPage->add('
'); + } + $oPage->add_ready_script('$(".check_select").bind("click change", function() { WizardUpdateButtons(); });'); + + $oPage->add_script( + << 'WizStepDone', 'state' => ''); } - private function NeedsRgpdConsent() - { - $sMode = $this->oWizard->GetParameter('install_mode'); - $aSelectedModules = json_decode($this->oWizard->GetParameter('selected_modules'), true); - return $sMode == 'install' && !SetupUtils::IsProductVersion(array_flip($aSelectedModules)); - } - public function Display(WebPage $oPage) { $oPage->add_style( @@ -2303,30 +2326,6 @@ CSS $oPage->add(''); // progress_content $oPage->add(''); - if ($this->NeedsRgpdConsent()) { - $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR). -By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. -This data remains anonymous until it is associated to a user account on iTop Hub. -List of collected data available in our Data privacy section.

More informations here

'); - $oPage->add(''); - $oPage->add(''); - $oPage->add('
'); - $oPage->add_ready_script('$("#rgpd_consent").bind("click change", function() { WizardUpdateButtons(); });'); - } - $oPage->add_script( - <<add(''); @@ -2467,7 +2466,6 @@ JS WizardUpdateButtons(); $('#setup_msg').html('$sMessage'); $('#progress').progression( {Current:{$aRes['percentage-completed']}, Maximum: 100} ); - $("#rgpd_message").hide(); //$("#percentage").html('{$aRes['percentage-completed']} % completed
{$aRes['next-step-label']}'); ExecuteStep('{$aRes['next-step']}'); @@ -2507,7 +2505,7 @@ EOF */ public function JSCanMoveForward() { - return 'return (($("#wiz_form").data("installation_status") === "not started" && isRgpdConsentOk()) || ($("#wiz_form").data("installation_status") === "completed"));'; + return 'return (($("#wiz_form").data("installation_status") === "not started") || ($("#wiz_form").data("installation_status") === "completed"));'; } /** From 53d2129bd1243de2de699485552538e1d8f5f34e Mon Sep 17 00:00:00 2001 From: acognet Date: Thu, 16 Jun 2022 17:58:19 +0200 Subject: [PATCH 10/10] =?UTF-8?q?N=C2=B05129=20-=20Unwanted=20popup=20duri?= =?UTF-8?q?ng=20a=20transition=20with=20an=20AttributeExternalField?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/wizardhelper.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/wizardhelper.js b/js/wizardhelper.js index b7ca604dc..261cb4c31 100644 --- a/js/wizardhelper.js +++ b/js/wizardhelper.js @@ -151,6 +151,9 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) var sString = "$('#"+aRefreshed[i]+"').trigger('change').trigger('update');"; window.setTimeout(sString, 1); // Synchronous 'trigger' does nothing, call it asynchronously } + if($('.blockUI').length == 0) { + $('.disabledDuringFieldLoading').prop("disabled", false).removeClass('disabledDuringFieldLoading'); + } }; this.UpdateWizard = function () @@ -179,6 +182,10 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) function(html){ $('#ajax_content').html(html); $('.blockUI').parent().unblock(); + + if($('.blockUI').length == 0) { + $('.disabledDuringFieldLoading').prop("disabled", false).removeClass('disabledDuringFieldLoading'); + } //console.log('data received:', oWizardHelper); //oWizardHelper.FromJSON(json_data); //oWizardHelper.UpdateFields(); // Is done directly in the html provided by ajax.render.php @@ -215,6 +222,7 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) index = 0; this.ResetQuery(); this.UpdateWizard(); + var fieldForm=null; while(index < aFieldNames.length ) { sAttCode = aFieldNames[index]; @@ -225,10 +233,14 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) message: '', overlayCSS: {backgroundColor: '#f1f1f1', opacity: 0.3} }); + fieldForm=$('#field_' + sFieldId).closest('form'); this.RequestAllowedValues(sAttCode); } index++; } + if(fieldForm!=null){ + fieldForm.find('button[type=submit]:not(:disabled)').prop("disabled", true).addClass('disabledDuringFieldLoading'); + } this.AjaxQueryServer(); };