From a45177410ec0c2c8944f9c30d5434b3ce18d7a04 Mon Sep 17 00:00:00 2001 From: Timothee Date: Tue, 6 Jun 2023 16:47:06 +0200 Subject: [PATCH 1/9] =?UTF-8?q?N=C2=B06350=20-=20Fixing=20phpunit=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/unitary-tests/application/utilsTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/php-unit-tests/unitary-tests/application/utilsTest.php b/tests/php-unit-tests/unitary-tests/application/utilsTest.php index 84205537b..6622de767 100644 --- a/tests/php-unit-tests/unitary-tests/application/utilsTest.php +++ b/tests/php-unit-tests/unitary-tests/application/utilsTest.php @@ -495,7 +495,7 @@ class utilsTest extends ItopTestCase 'good element_identifier' => ['element_identifier', 'AD05nb', 'AD05nb'], 'bad element_identifier' => ['element_identifier', 'AD05nb+', 'AD05nb'], 'good url' => ['url', 'https://www.w3schools.com', 'https://www.w3schools.com'], - 'bad url' => ['url', 'https://www.w3schoo��ls.co�m', 'https://www.w3schools.com'], + 'bad url' => ['url', 'https://www.w3schoo��ls.co�m', null], 'raw_data' => ['raw_data', '\s😃😃😃', '\s😃😃😃'], ]; } From c596fa2967a27a3e42c481b0e32bb19708169afa Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 7 Jun 2023 09:13:13 +0200 Subject: [PATCH 2/9] =?UTF-8?q?N=C2=B06358=20-=20Login=20API=20REST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/loginbasic.class.inc.php | 13 +++++--- application/logindefault.class.inc.php | 8 ++++- application/loginexternal.class.inc.php | 13 +++++--- application/loginform.class.inc.php | 12 ++++--- application/loginwebpage.class.inc.php | 28 ++++++++++------- .../2.x/authent-cas/src/CASLoginExtension.php | 16 +++++++--- pages/ajax.searchform.php | 5 +-- pages/logoff.php | 6 ++++ synchro/synchro_exec.php | 31 ++++++++++++++++++- synchro/synchro_import.php | 31 ++++++++++++++++++- webservices/import.php | 31 ++++++++++++++++++- webservices/rest.php | 12 ++++--- 12 files changed, 165 insertions(+), 41 deletions(-) diff --git a/application/loginbasic.class.inc.php b/application/loginbasic.class.inc.php index 24b1afb2d..36e387cac 100644 --- a/application/loginbasic.class.inc.php +++ b/application/loginbasic.class.inc.php @@ -51,7 +51,7 @@ class LoginBasic extends AbstractLoginFSMExtension protected function OnCheckCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'basic') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'basic') { list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword(); if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal')) @@ -67,7 +67,7 @@ class LoginBasic extends AbstractLoginFSMExtension protected function OnCredentialsOK(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'basic') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'basic') { $sAuthUser = $_SESSION['auth_user']; LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']); @@ -77,8 +77,13 @@ class LoginBasic extends AbstractLoginFSMExtension protected function OnError(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'basic') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'basic') { + $iOnExit = LoginWebPage::getIOnExit(); + if ($iOnExit === LoginWebPage::EXIT_RETURN) + { + return LoginWebPage::LOGIN_FSM_RETURN; // Error, exit FSM + } LoginWebPage::HTTP401Error(); } return LoginWebPage::LOGIN_FSM_CONTINUE; @@ -86,7 +91,7 @@ class LoginBasic extends AbstractLoginFSMExtension protected function OnConnected(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'basic') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'basic') { $_SESSION['can_logoff'] = true; return LoginWebPage::CheckLoggedUser($iErrorCode); diff --git a/application/logindefault.class.inc.php b/application/logindefault.class.inc.php index 7751b48b6..fb82eb6e0 100644 --- a/application/logindefault.class.inc.php +++ b/application/logindefault.class.inc.php @@ -77,7 +77,7 @@ class LoginDefaultAfter extends AbstractLoginFSMExtension implements iLogoutExte { self::ResetLoginSession(); $iOnExit = LoginWebPage::getIOnExit(); - if ($iOnExit == LoginWebPage::EXIT_RETURN) + if ($iOnExit === LoginWebPage::EXIT_RETURN) { return LoginWebPage::LOGIN_FSM_RETURN; // Error, exit FSM } @@ -93,6 +93,12 @@ class LoginDefaultAfter extends AbstractLoginFSMExtension implements iLogoutExte { if (!isset($_SESSION['login_mode'])) { + // N°6358 - if EXIT_RETURN was asked, send an error + if (LoginWebPage::getIOnExit() === LoginWebPage::EXIT_RETURN) { + $iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS; + return LoginWebPage::LOGIN_FSM_ERROR; + } + // If no plugin validated the user, exit self::ResetLoginSession(); exit(); diff --git a/application/loginexternal.class.inc.php b/application/loginexternal.class.inc.php index c2c13de86..c1ff88a21 100644 --- a/application/loginexternal.class.inc.php +++ b/application/loginexternal.class.inc.php @@ -35,7 +35,7 @@ class LoginExternal extends AbstractLoginFSMExtension protected function OnCheckCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'external') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'external') { $sAuthUser = $this->GetAuthUser(); if (!UserRights::CheckCredentials($sAuthUser, '', $_SESSION['login_mode'], 'external')) @@ -51,7 +51,7 @@ class LoginExternal extends AbstractLoginFSMExtension protected function OnCredentialsOK(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'external') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'external') { $sAuthUser = $_SESSION['auth_user']; LoginWebPage::OnLoginSuccess($sAuthUser, 'external', $_SESSION['login_mode']); @@ -61,7 +61,7 @@ class LoginExternal extends AbstractLoginFSMExtension protected function OnConnected(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'external') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'external') { $_SESSION['can_logoff'] = false; return LoginWebPage::CheckLoggedUser($iErrorCode); @@ -71,8 +71,13 @@ class LoginExternal extends AbstractLoginFSMExtension protected function OnError(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'external') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'external') { + $iOnExit = LoginWebPage::getIOnExit(); + if ($iOnExit === LoginWebPage::EXIT_RETURN) + { + return LoginWebPage::LOGIN_FSM_RETURN; // Error, exit FSM + } LoginWebPage::HTTP401Error(); } return LoginWebPage::LOGIN_FSM_CONTINUE; diff --git a/application/loginform.class.inc.php b/application/loginform.class.inc.php index 9a044fade..045474891 100644 --- a/application/loginform.class.inc.php +++ b/application/loginform.class.inc.php @@ -43,6 +43,10 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension exit; } + if (LoginWebPage::getIOnExit() === LoginWebPage::EXIT_RETURN) { + return LoginWebPage::LOGIN_FSM_CONTINUE; + } + // No credentials yet, display the form $oPage = LoginWebPage::NewLoginWebPage(); $oPage->DisplayLoginForm($this->bForceFormOnError); @@ -62,7 +66,7 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension */ protected function OnCheckCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'form') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'form') { $sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data'); $sAuthPwd = utils::ReadPostedParam('auth_pwd', null, 'raw_data'); @@ -82,7 +86,7 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension */ protected function OnCredentialsOK(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'form') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'form') { $sAuthUser = $_SESSION['auth_user']; // Store 'auth_user' in session for further use @@ -96,7 +100,7 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension */ protected function OnError(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'form') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'form') { $this->bForceFormOnError = true; } @@ -108,7 +112,7 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension */ protected function OnConnected(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'form') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'form') { $_SESSION['can_logoff'] = true; return LoginWebPage::CheckLoggedUser($iErrorCode); diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index 3745589dc..490ced28a 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -32,7 +32,7 @@ class LoginWebPage extends NiceWebPage { const EXIT_PROMPT = 0; const EXIT_HTTP_401 = 1; - const EXIT_RETURN = 2; + const EXIT_RETURN = 2; // Non interactive mode (ajax, rest, ...) const EXIT_CODE_OK = 0; const EXIT_CODE_MISSINGLOGIN = 1; @@ -352,14 +352,20 @@ class LoginWebPage extends NiceWebPage $this->output(); } - public static function ResetSession() + public static function ResetSession($bFullCleanup = false) { - // Unset all of the session variables. - unset($_SESSION['auth_user']); - unset($_SESSION['login_state']); - unset($_SESSION['can_logoff']); - unset($_SESSION['archive_mode']); - unset($_SESSION['impersonate_user']); + if ($bFullCleanup) { + // Unset all of the session variables. + foreach (array_keys($_SESSION) as $sKey) { + unset($_SESSION[$sKey]); + } + } else { + unset($_SESSION['auth_user']); + unset($_SESSION['login_state']); + unset($_SESSION['can_logoff']); + unset($_SESSION['archive_mode']); + unset($_SESSION['impersonate_user']); + } UserRights::_ResetSessionCache(); // If it's desired to kill the session, also delete the session cookie. // Note: This will destroy the session, and not just the session data! @@ -931,7 +937,7 @@ class LoginWebPage extends NiceWebPage } else { - if ($iOnExit == self::EXIT_RETURN) + if ($iOnExit === self::EXIT_RETURN) { return self::EXIT_CODE_PORTALUSERNOTAUTHORIZED; } @@ -987,7 +993,7 @@ class LoginWebPage extends NiceWebPage { if ($bMustBeAdmin && !UserRights::IsAdministrator()) { - if ($iOnExit == self::EXIT_RETURN) + if ($iOnExit === self::EXIT_RETURN) { return self::EXIT_CODE_MUSTBEADMIN; } @@ -1003,7 +1009,7 @@ class LoginWebPage extends NiceWebPage } $iRet = call_user_func(array(self::$sHandlerClass, 'ChangeLocation'), $sRequestedPortalId, $iOnExit); } - if ($iOnExit == self::EXIT_RETURN) + if ($iOnExit === self::EXIT_RETURN) { return $iRet; } diff --git a/datamodels/2.x/authent-cas/src/CASLoginExtension.php b/datamodels/2.x/authent-cas/src/CASLoginExtension.php index 0adc96c2d..ce65b52ec 100644 --- a/datamodels/2.x/authent-cas/src/CASLoginExtension.php +++ b/datamodels/2.x/authent-cas/src/CASLoginExtension.php @@ -47,6 +47,11 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte protected function OnReadCredentials(&$iErrorCode) { + if (LoginWebPage::getIOnExit() === LoginWebPage::EXIT_RETURN) { + // Not allowed if not already connected + return LoginWebPage::LOGIN_FSM_CONTINUE; + } + if (!isset($_SESSION['login_mode']) || ($_SESSION['login_mode'] == 'cas')) { static::InitCASClient(); @@ -71,7 +76,8 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte return LoginWebPage::LOGIN_FSM_ERROR; } } - $_SESSION['login_mode'] = 'cas'; + + $_SESSION['login_mode'] = 'cas'; phpCAS::forceAuthentication(); // Redirect to CAS and exit } } @@ -80,7 +86,7 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte protected function OnCheckCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'cas') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { if (!isset($_SESSION['auth_user'])) { @@ -97,7 +103,7 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte protected function OnCredentialsOK(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'cas') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { $sAuthUser = $_SESSION['auth_user']; if (!LoginWebPage::CheckUser($sAuthUser)) @@ -112,7 +118,7 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte protected function OnError(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'cas') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { unset($_SESSION['phpCAS']); if ($iErrorCode != LoginWebPage::EXIT_CODE_MISSINGLOGIN) @@ -127,7 +133,7 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte protected function OnConnected(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'cas') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { $_SESSION['can_logoff'] = true; return LoginWebPage::CheckLoggedUser($iErrorCode); diff --git a/pages/ajax.searchform.php b/pages/ajax.searchform.php index 5bdcfd343..ccec63fc2 100644 --- a/pages/ajax.searchform.php +++ b/pages/ajax.searchform.php @@ -37,10 +37,7 @@ try $oKPI->ComputeAndReport('Data model loaded'); $oKPI = new ExecutionKPI(); - if (LoginWebPage::EXIT_CODE_OK != LoginWebPage::DoLoginEx('backoffice', false, LoginWebPage::EXIT_RETURN)) - { - throw new SecurityException('You must be logged in'); - } + LoginWebPage::DoLogin(); $sParams = utils::ReadParam('params', '', false, 'raw_data'); if (!$sParams) diff --git a/pages/logoff.php b/pages/logoff.php index 2cdded5ae..f3b5a446f 100644 --- a/pages/logoff.php +++ b/pages/logoff.php @@ -96,5 +96,11 @@ if ($bLoginDebug) IssueLog::Info("--> Display logout page"); } +LoginWebPage::ResetSession(true); +if ($bLoginDebug) { + $sSessionLog = session_id().' '.utils::GetSessionLog(); + IssueLog::Info("SESSION: $sSessionLog"); +} + $oPage = LoginWebPage::NewLoginWebPage(); $oPage->DisplayLogoutPage($bPortal); diff --git a/synchro/synchro_exec.php b/synchro/synchro_exec.php index d212ca776..ef6e9f181 100644 --- a/synchro/synchro_exec.php +++ b/synchro/synchro_exec.php @@ -111,7 +111,36 @@ if (utils::IsModeCLI()) else { require_once(APPROOT.'/application/loginwebpage.class.inc.php'); - LoginWebPage::DoLogin(); // Check user rights and prompt if needed + LoginWebPage::ResetSession(true); + $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); + if ($iRet !== LoginWebPage::EXIT_CODE_OK) { + switch ($iRet) { + case LoginWebPage::EXIT_CODE_MISSINGLOGIN: + $oP->p("Missing parameter 'auth_user'"); + break; + + case LoginWebPage::EXIT_CODE_MISSINGPASSWORD: + $oP->p("Missing parameter 'auth_pwd'"); + break; + + case LoginWebPage::EXIT_CODE_WRONGCREDENTIALS: + $oP->p('Invalid login'); + break; + + case LoginWebPage::EXIT_CODE_PORTALUSERNOTAUTHORIZED: + $oP->p('Portal user is not allowed'); + break; + + case LoginWebPage::EXIT_CODE_NOTAUTHORIZED: + $oP->p('This user is not authorized to use the web services. (The profile REST Services User is required to access the REST web services)'); + break; + + default: + $oP->p("Unknown authentication error (retCode=$iRet)"); + } + $oP->output(); + exit -1; + } $sDataSourcesList = utils::ReadParam('data_sources', null, true, 'raw_data'); diff --git a/synchro/synchro_import.php b/synchro/synchro_import.php index c2cfb0407..0520e3450 100644 --- a/synchro/synchro_import.php +++ b/synchro/synchro_import.php @@ -303,7 +303,36 @@ if (utils::IsModeCLI()) else { require_once APPROOT.'/application/loginwebpage.class.inc.php'; - LoginWebPage::DoLogin(); // Check user rights and prompt if needed + LoginWebPage::ResetSession(true); + $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); + if ($iRet !== LoginWebPage::EXIT_CODE_OK) { + switch ($iRet) { + case LoginWebPage::EXIT_CODE_MISSINGLOGIN: + $oP->p("Missing parameter 'auth_user'"); + break; + + case LoginWebPage::EXIT_CODE_MISSINGPASSWORD: + $oP->p("Missing parameter 'auth_pwd'"); + break; + + case LoginWebPage::EXIT_CODE_WRONGCREDENTIALS: + $oP->p('Invalid login'); + break; + + case LoginWebPage::EXIT_CODE_PORTALUSERNOTAUTHORIZED: + $oP->p('Portal user is not allowed'); + break; + + case LoginWebPage::EXIT_CODE_NOTAUTHORIZED: + $oP->p('This user is not authorized to use the web services. (The profile REST Services User is required to access the REST web services)'); + break; + + default: + $oP->p("Unknown authentication error (retCode=$iRet)"); + } + $oP->output(); + exit -1; + } $sCSVData = utils::ReadPostedParam('csvdata', '', 'raw_data'); } diff --git a/webservices/import.php b/webservices/import.php index c43071822..59fea608f 100644 --- a/webservices/import.php +++ b/webservices/import.php @@ -260,7 +260,36 @@ if (utils::IsModeCLI()) else { require_once(APPROOT.'/application/loginwebpage.class.inc.php'); - LoginWebPage::DoLogin(); // Check user rights and prompt if needed + LoginWebPage::ResetSession(true); + $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); + if ($iRet !== LoginWebPage::EXIT_CODE_OK) { + switch ($iRet) { + case LoginWebPage::EXIT_CODE_MISSINGLOGIN: + $oP->p("Missing parameter 'auth_user'"); + break; + + case LoginWebPage::EXIT_CODE_MISSINGPASSWORD: + $oP->p("Missing parameter 'auth_pwd'"); + break; + + case LoginWebPage::EXIT_CODE_WRONGCREDENTIALS: + $oP->p('Invalid login'); + break; + + case LoginWebPage::EXIT_CODE_PORTALUSERNOTAUTHORIZED: + $oP->p('Portal user is not allowed'); + break; + + case LoginWebPage::EXIT_CODE_NOTAUTHORIZED: + $oP->p('This user is not authorized to use the web services. (The profile REST Services User is required to access the REST web services)'); + break; + + default: + $oP->p("Unknown authentication error (retCode=$iRet)"); + } + $oP->output(); + exit -1; + } $sCSVData = utils::ReadPostedParam('csvdata', '', 'raw_data'); } diff --git a/webservices/rest.php b/webservices/rest.php index 647a035f2..d68c95e84 100644 --- a/webservices/rest.php +++ b/webservices/rest.php @@ -80,10 +80,12 @@ try $oKPI->ComputeAndReport('Data model loaded'); - $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); // Starting with iTop 2.2.0 portal users are no longer allowed to access the REST/JSON API - $oKPI->ComputeAndReport('User login'); - - if ($iRet == LoginWebPage::EXIT_CODE_OK) + // N°6358 - force credentials for REST calls + LoginWebPage::ResetSession(true); + $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); + $oKPI->ComputeAndReport('User login'); + + if ($iRet == LoginWebPage::EXIT_CODE_OK) { // Extra validation of the profile if ((MetaModel::GetConfig()->Get('secure_rest_services') == true) && !UserRights::HasProfile('REST Services User')) @@ -94,7 +96,7 @@ try } if ($iRet != LoginWebPage::EXIT_CODE_OK) { - switch($iRet) + switch($iRet) { case LoginWebPage::EXIT_CODE_MISSINGLOGIN: throw new Exception("Missing parameter 'auth_user'", RestResult::MISSING_AUTH_USER); From 90cf7502e81bc9b68df78adf18e0206dcebf264a Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 7 Jun 2023 10:09:30 +0200 Subject: [PATCH 3/9] =?UTF-8?q?N=C2=B06358=20-=20Login=20REST=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/loginurl.class.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/loginurl.class.inc.php b/application/loginurl.class.inc.php index 166941d31..478d54808 100644 --- a/application/loginurl.class.inc.php +++ b/application/loginurl.class.inc.php @@ -40,7 +40,7 @@ class LoginURL extends AbstractLoginFSMExtension protected function OnReadCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'url') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'url') { $_SESSION['login_temp_auth_user'] = utils::ReadParam('auth_user', '', false, 'raw_data'); } @@ -49,7 +49,7 @@ class LoginURL extends AbstractLoginFSMExtension protected function OnCheckCredentials(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'url') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'url') { $sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data'); $sAuthPwd = utils::ReadParam('auth_pwd', null, false, 'raw_data'); @@ -66,7 +66,7 @@ class LoginURL extends AbstractLoginFSMExtension protected function OnCredentialsOK(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'url') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'url') { $sAuthUser = $_SESSION['auth_user']; LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']); @@ -76,7 +76,7 @@ class LoginURL extends AbstractLoginFSMExtension protected function OnError(&$iErrorCode) { - if ($_SESSION['login_mode'] == 'url') + if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'url') { $this->bErrorOccurred = true; } From 8b6ea43ebee11773c28c0f31d4c0e5d80edf4147 Mon Sep 17 00:00:00 2001 From: odain Date: Wed, 7 Jun 2023 15:05:32 +0200 Subject: [PATCH 4/9] =?UTF-8?q?N=C2=B06358=20-=20Login=20REST=20API=20-=20?= =?UTF-8?q?fix=20cas=20+=20add=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.x/authent-cas/src/CASLoginExtension.php | 7 +- .../webservices/CliResetSessionTest.php | 257 ++++++++++++++++++ 2 files changed, 263 insertions(+), 1 deletion(-) create mode 100644 tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php diff --git a/datamodels/2.x/authent-cas/src/CASLoginExtension.php b/datamodels/2.x/authent-cas/src/CASLoginExtension.php index ce65b52ec..1d0996467 100644 --- a/datamodels/2.x/authent-cas/src/CASLoginExtension.php +++ b/datamodels/2.x/authent-cas/src/CASLoginExtension.php @@ -120,6 +120,11 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte { if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { + if (LoginWebPage::getIOnExit() === LoginWebPage::EXIT_RETURN) { + // Not allowed if not already connected + return LoginWebPage::LOGIN_FSM_CONTINUE; + } + unset($_SESSION['phpCAS']); if ($iErrorCode != LoginWebPage::EXIT_CODE_MISSINGLOGIN) { @@ -162,7 +167,7 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte { phpCAS::setLogger(new CASLogger(APPROOT.'log/cas.log')); } - + // Initialize phpCAS $sCASVersion = Config::Get('cas_version'); $sCASHost = Config::Get('cas_host'); diff --git a/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php b/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php new file mode 100644 index 000000000..e4c83bfdd --- /dev/null +++ b/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php @@ -0,0 +1,257 @@ +sConfigTmpBackupFile = tempnam(sys_get_temp_dir(), "config_"); + MetaModel::GetConfig()->WriteToFile($this->sConfigTmpBackupFile); + + $this->sLogin = "rest-user-".date('dmYHis'); + $this->CreateTestOrganization(); + + $this->sCookieFile = tempnam(sys_get_temp_dir(), 'jsondata_'); + + $this->sUrl = \MetaModel::GetConfig()->Get('app_root_url'); + + $oRestProfile = \MetaModel::GetObjectFromOQL("SELECT URP_Profiles WHERE name = :name", array('name' => 'REST Services User'), true); + $oAdminProfile = \MetaModel::GetObjectFromOQL("SELECT URP_Profiles WHERE name = :name", array('name' => 'Administrator'), true); + + if (is_object($oRestProfile) && is_object($oAdminProfile)) { + $oUser = $this->CreateUser($this->sLogin, $oRestProfile->GetKey(), $this->sPassword); + $this->sUserId = $oUser->GetKey(); + $this->AddProfileToUser($oUser, $oAdminProfile->GetKey()); + } + } + + protected function tearDown(): void { + parent::tearDown(); + + if (! is_null($this->sConfigTmpBackupFile) && is_file($this->sConfigTmpBackupFile)){ + //put config back + $sConfigPath = MetaModel::GetConfig()->GetLoadedFile(); + @chmod($sConfigPath, 0770); + $oConfig = new Config($this->sConfigTmpBackupFile); + $oConfig->WriteToFile($sConfigPath); + @chmod($sConfigPath, 0440); + unlink($this->sConfigTmpBackupFile); + } + + if (!empty($this->sCookieFile)) { + unlink($this->sCookieFile); + } + } + + protected function AddLoginMode($sLoginMode){ + @chmod(MetaModel::GetConfig()->GetLoadedFile(), 0770); + $aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes(); + if (! in_array($sLoginMode, $aAllowedLoginTypes)){ + $aAllowedLoginTypes[] = $sLoginMode; + MetaModel::GetConfig()->SetAllowedLoginTypes($aAllowedLoginTypes); + MetaModel::GetConfig()->WriteToFile(); + } + @chmod(MetaModel::GetConfig()->GetLoadedFile(), 0440); + } + + protected function SetLoginModes($aAllowedLoginTypes){ + @chmod(MetaModel::GetConfig()->GetLoadedFile(), 0770); + MetaModel::GetConfig()->SetAllowedLoginTypes($aAllowedLoginTypes); + MetaModel::GetConfig()->WriteToFile(); + @chmod(MetaModel::GetConfig()->GetLoadedFile(), 0440); + } + + public function RestProvider(){ + return [ + 'nominal / no login_mode forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic', + 'sForcedLoginMode' => null, + ], + 'nominal / form forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic', + 'sForcedLoginMode' => 'form', + ], + 'nominal / external forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic', + 'sForcedLoginMode' => 'external', + ], + 'nominal / basic forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic', + 'sForcedLoginMode' => 'basic', + ], + 'nominal / url forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic|url', + 'sForcedLoginMode' => 'url', + ], + 'cas / cas forced' => [ + 'sConfiguredLoginModes' => 'form|external|basic|cas', + 'sForcedLoginMode' => 'cas', + ], + ]; + } + + /** + * @dataProvider RestProvider + * @param $aLoginModes + * @param $sForcedLoginMode + * + * @return void + */ + public function testRest($sConfiguredLoginModes=null, $sForcedLoginMode=null, $sExpectedFailHttpCode="200"){ + if (! is_null($sConfiguredLoginModes)){ + $this->SetLoginModes(explode('|', $sConfiguredLoginModes)); + } + + $sJsonGetContent = <<sUserId, + "output_fields": "id" +} +JSON; + $aPostFields = [ + 'version' => '1.2', + 'auth_user' => $this->sLogin, + 'auth_pwd' => $this->sPassword, + 'json_data' => $sJsonGetContent, + ]; + list($iHttpCode, $sJson) = $this->CallRestApi($aPostFields); + $this->assertEquals(200, $iHttpCode); + + $aJson = json_decode($sJson, true); + $this->assertTrue(is_array($aJson), $sJson); + $this->assertEquals("0", $aJson['code'], $sJson); + + //2nd call to REST API made with previous session cookie + //no need to pass auth_user/auth_pwd + $aPostFields = [ + 'version' => '1.2', + 'json_data' => $sJsonGetContent, + ]; + list($iHttpCode, $sJson) = $this->CallRestApi($aPostFields, $sForcedLoginMode); + $this->debug($sJson); + $this->assertEquals($sExpectedFailHttpCode, $iHttpCode); + if ($iHttpCode === "200") { + $this->assertEquals('{"code":1,"message":"Error: Invalid login"}', $sJson); + } + } + + public function OtherCliProvider(){ + return [ + 'import' => [ 'webservices/import.php' ], + 'synchro_exec' => [ 'synchro/synchro_exec.php' ], + 'synchro_import' => [ 'synchro/synchro_import.php' ], + ]; + } + + /** + * @dataProvider OtherCliProvider + */ + public function testImport($sUri){ + $sJsonGetContent = <<sUserId, + "output_fields": "id" +} +JSON; + $aPostFields = [ + 'version' => '1.2', + 'auth_user' => $this->sLogin, + 'auth_pwd' => $this->sPassword, + 'json_data' => $sJsonGetContent, + ]; + list($iHttpCode, $sOutput) = $this->CallRestApi($aPostFields); + $this->assertEquals(200, $iHttpCode); + + $aJson = json_decode($sOutput, true); + $this->assertTrue(is_array($aJson), $sOutput); + $this->assertEquals("0", $aJson['code'], $sOutput); + + //2nd call to REST API made with previous session cookie + //no need to pass auth_user/auth_pwd + $aPostFields = [ + 'version' => '1.2', + 'json_data' => $sJsonGetContent, + ]; + list($iHttpCode, $sOutput) = $this->CallRestApi($aPostFields, null, $sUri); + $this->debug($sOutput); + $this->assertEquals("200", $iHttpCode); + $this->assertContains("Invalid login", $sOutput); + } + + /** + * @param $aPostFields + * + * @return array($iHttpCode, $sBody) + */ + private function CallRestApi($aPostFields, $sForcedLoginMode=null, $sUri='webservices/rest.php'): array { + $ch = curl_init(); + + curl_setopt ($ch, CURLOPT_COOKIEJAR, $this->sCookieFile); + curl_setopt ($ch, CURLOPT_COOKIEFILE, $this->sCookieFile); + + $sUrl = "$this->sUrl/$sUri"; + if (!is_null($sForcedLoginMode)){ + $sUrl .= "?login_mode=$sForcedLoginMode"; + } + curl_setopt($ch, CURLOPT_URL, $sUrl); + curl_setopt($ch, CURLOPT_POST, 1);// set post data to true + curl_setopt($ch, CURLOPT_POSTFIELDS, $aPostFields); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_HEADER, 1); + // Force disable of certificate check as most of dev / test env have a self-signed certificate + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + + $sResponse = curl_exec($ch); + /** $sResponse example + * "HTTP/1.1 200 OK + Date: Wed, 07 Jun 2023 05:00:40 GMT + Server: Apache/2.4.29 (Ubuntu) + Set-Cookie: itop-2e83d2e9b00e354fdc528621cac532ac=q7ldcjq0rvbn33ccr9q8u8e953; path=/ + */ + //var_dump($sResponse); + $iHeaderSize = curl_getinfo($ch,CURLINFO_HEADER_SIZE); + $sBody = substr($sResponse, $iHeaderSize); + + //$iHttpCode = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE)); + if (preg_match('/HTTP.* (\d*) /', $sResponse, $aMatches)){ + $sHttpCode = $aMatches[1]; + } else { + $sHttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + } + curl_close ($ch); + + return array($sHttpCode, $sBody); + } +} From 3a891f707caee4e6c94c6365ca636f5b78d6962f Mon Sep 17 00:00:00 2001 From: odain Date: Wed, 7 Jun 2023 15:06:28 +0200 Subject: [PATCH 5/9] ci: enhance AddProfile test method to work with any User (not only UserLocal) --- tests/php-unit-tests/ItopDataTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/php-unit-tests/ItopDataTestCase.php b/tests/php-unit-tests/ItopDataTestCase.php index 6315ccc4d..ebdaa206c 100644 --- a/tests/php-unit-tests/ItopDataTestCase.php +++ b/tests/php-unit-tests/ItopDataTestCase.php @@ -455,7 +455,7 @@ class ItopDataTestCase extends ItopTestCase /** @var DBObjectSet $oSet */ $oSet = $oUser->Get('profile_list'); $oSet->AddObject($oUserProfile); - $oUser = $this->updateObject('UserLocal', $oUser->GetKey(), array( + $oUser = $this->updateObject('User', $oUser->GetKey(), array( 'profile_list' => $oSet, )); $this->debug("Updated {$oUser->GetName()} ({$oUser->GetKey()})"); From fff46d99fc2a37875ddb8ba2385b89dcfbcd73db Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 7 Jun 2023 15:31:51 +0200 Subject: [PATCH 6/9] =?UTF-8?q?N=C2=B06358=20-=20Login=20REST=20API=20-=20?= =?UTF-8?q?renamed=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/authent-cas/src/CASLoginExtension.php | 5 +++-- .../unitary-tests/webservices/CliResetSessionTest.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/authent-cas/src/CASLoginExtension.php b/datamodels/2.x/authent-cas/src/CASLoginExtension.php index 1d0996467..94f32a5c0 100644 --- a/datamodels/2.x/authent-cas/src/CASLoginExtension.php +++ b/datamodels/2.x/authent-cas/src/CASLoginExtension.php @@ -120,12 +120,13 @@ class CASLoginExtension extends AbstractLoginFSMExtension implements iLogoutExte { if (isset($_SESSION['login_mode']) && $_SESSION['login_mode'] == 'cas') { + unset($_SESSION['phpCAS']); + if (LoginWebPage::getIOnExit() === LoginWebPage::EXIT_RETURN) { - // Not allowed if not already connected + // don't display the login page return LoginWebPage::LOGIN_FSM_CONTINUE; } - unset($_SESSION['phpCAS']); if ($iErrorCode != LoginWebPage::EXIT_CODE_MISSINGLOGIN) { $oLoginWebPage = new LoginWebPage(); diff --git a/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php b/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php index e4c83bfdd..cd03f3cfd 100644 --- a/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php +++ b/tests/php-unit-tests/unitary-tests/webservices/CliResetSessionTest.php @@ -109,7 +109,7 @@ class CliResetSessionTest extends ItopDataTestCase 'sConfiguredLoginModes' => 'form|external|basic|url', 'sForcedLoginMode' => 'url', ], - 'cas / cas forced' => [ + 'nominal / cas forced' => [ 'sConfiguredLoginModes' => 'form|external|basic|cas', 'sForcedLoginMode' => 'cas', ], From 2405810864837c9ee9da0896c6c75515b87a9460 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 7 Jun 2023 16:45:35 +0200 Subject: [PATCH 7/9] =?UTF-8?q?N=C2=B06238=20Security=20hardening?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 + composer.lock | 21 +-- lib/autoload.php | 5 + lib/composer/ClassLoader.php | 2 +- lib/composer/InstalledVersions.php | 16 +- 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 | 19 +-- lib/composer/installed.php | 142 +++++++++--------- lib/guzzlehttp/psr7/.github/workflows/ci.yml | 8 +- .../psr7/.github/workflows/integration.yml | 7 +- .../psr7/.github/workflows/static.yml | 4 +- lib/guzzlehttp/psr7/CHANGELOG.md | 6 + lib/guzzlehttp/psr7/composer.json | 5 - lib/guzzlehttp/psr7/src/MessageTrait.php | 13 +- 20 files changed, 145 insertions(+), 160 deletions(-) diff --git a/composer.json b/composer.json index 485726bfc..afa4b10b3 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "combodo/tcpdf": "~6.4.4", "firebase/php-jwt": "~6.4.0", "guzzlehttp/guzzle": "^6.5.8", + "guzzlehttp/psr7": "~1.9.1", "laminas/laminas-mail": "^2.11", "laminas/laminas-servicemanager": "^3.5", "league/oauth2-google": "^3.0", diff --git a/composer.lock b/composer.lock index d9ba5d8de..f2d6ae4d8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e5c0746c3d1bb9df9151c910e8f50955", + "content-hash": "abee0f7bd244530a88b08e1e338b0ec5", "packages": [ { "name": "combodo/tcpdf", @@ -516,16 +516,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", "shasum": "" }, "require": { @@ -544,11 +544,6 @@ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "autoload": { "files": [ "src/functions_include.php" @@ -606,7 +601,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/guzzle/psr7/tree/1.9.1" }, "funding": [ { @@ -622,7 +617,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:03+00:00" + "time": "2023-04-17T16:00:37+00:00" }, { "name": "laminas/laminas-loader", @@ -4757,5 +4752,5 @@ "platform-overrides": { "php": "7.1.3" }, - "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..c6b54af7b 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -21,12 +21,14 @@ 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 { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; @@ -37,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -241,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { @@ -255,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @@ -278,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -301,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { @@ -311,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index c8dd00172..adac47083 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 4e2ed1232..de1646c31 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 1d7f992bc..1d8433373 100644 --- a/lib/composer/installed.json +++ b/lib/composer/installed.json @@ -531,17 +531,17 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.9.0", - "version_normalized": "1.9.0.0", + "version": "1.9.1", + "version_normalized": "1.9.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", "shasum": "" }, "require": { @@ -559,13 +559,8 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2022-06-20T21:43:03+00:00", + "time": "2023-04-17T16:00:37+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "installation-source": "dist", "autoload": { "files": [ @@ -624,7 +619,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/guzzle/psr7/tree/1.9.1" }, "funding": [ { diff --git a/lib/composer/installed.php b/lib/composer/installed.php index d2879be17..736c4ce60 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -1,40 +1,40 @@ array( + 'name' => 'combodo/itop', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', + 'reference' => 'fff46d99fc2a37875ddb8ba2385b89dcfbcd73db', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '18ed5ed526d7f980fb52e936c0d1ddb3062172fb', - 'name' => 'combodo/itop', 'dev' => true, ), 'versions' => array( 'combodo/itop' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', + 'reference' => 'fff46d99fc2a37875ddb8ba2385b89dcfbcd73db', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '18ed5ed526d7f980fb52e936c0d1ddb3062172fb', 'dev_requirement' => false, ), 'combodo/tcpdf' => array( 'pretty_version' => '6.4.4', 'version' => '6.4.4.0', + 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8', 'type' => 'library', 'install_path' => __DIR__ . '/../combodo/tcpdf', 'aliases' => array(), - 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8', 'dev_requirement' => false, ), 'container-interop/container-interop' => array( 'pretty_version' => '1.2.0', 'version' => '1.2.0.0', + 'reference' => '79cbf1341c22ec75643d841642dd5d6acd83bdb8', 'type' => 'library', 'install_path' => __DIR__ . '/../container-interop/container-interop', 'aliases' => array(), - 'reference' => '79cbf1341c22ec75643d841642dd5d6acd83bdb8', 'dev_requirement' => false, ), 'container-interop/container-interop-implementation' => array( @@ -46,208 +46,208 @@ 'doctrine/lexer' => array( 'pretty_version' => '1.0.2', 'version' => '1.0.2.0', + 'reference' => '1febd6c3ef84253d7c815bed85fc622ad207a9f8', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/lexer', 'aliases' => array(), - 'reference' => '1febd6c3ef84253d7c815bed85fc622ad207a9f8', 'dev_requirement' => false, ), 'egulias/email-validator' => array( 'pretty_version' => '2.1.25', 'version' => '2.1.25.0', + 'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4', 'type' => 'library', 'install_path' => __DIR__ . '/../egulias/email-validator', 'aliases' => array(), - 'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4', 'dev_requirement' => false, ), 'firebase/php-jwt' => array( 'pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', + 'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), - 'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224', 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( 'pretty_version' => '6.5.8', 'version' => '6.5.8.0', + 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), - 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( 'pretty_version' => '1.5.1', 'version' => '1.5.1.0', + 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), - 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '1.9.0', - 'version' => '1.9.0.0', + 'pretty_version' => '1.9.1', + 'version' => '1.9.1.0', + 'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), - 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318', 'dev_requirement' => false, ), 'laminas/laminas-loader' => array( 'pretty_version' => '2.6.1', 'version' => '2.6.1.0', + 'reference' => '5d01c2c237ae9e68bec262f339947e2ea18979bc', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-loader', 'aliases' => array(), - 'reference' => '5d01c2c237ae9e68bec262f339947e2ea18979bc', 'dev_requirement' => false, ), 'laminas/laminas-mail' => array( 'pretty_version' => '2.11.1', 'version' => '2.11.1.0', + 'reference' => '7f674afeb38100b1869ce8e56bf2ec3cba3c679c', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-mail', 'aliases' => array(), - 'reference' => '7f674afeb38100b1869ce8e56bf2ec3cba3c679c', 'dev_requirement' => false, ), 'laminas/laminas-mime' => array( 'pretty_version' => '2.7.4', 'version' => '2.7.4.0', + 'reference' => 'e45a7d856bf7b4a7b5bd00d6371f9961dc233add', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-mime', 'aliases' => array(), - 'reference' => 'e45a7d856bf7b4a7b5bd00d6371f9961dc233add', 'dev_requirement' => false, ), 'laminas/laminas-servicemanager' => array( 'pretty_version' => '3.5.2', 'version' => '3.5.2.0', + 'reference' => '0669e1eec8d9f61e35a5bc5012796d49f418b259', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-servicemanager', 'aliases' => array(), - 'reference' => '0669e1eec8d9f61e35a5bc5012796d49f418b259', 'dev_requirement' => false, ), 'laminas/laminas-stdlib' => array( 'pretty_version' => '3.2.1', 'version' => '3.2.1.0', + 'reference' => '2b18347625a2f06a1a485acfbc870f699dbe51c6', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-stdlib', 'aliases' => array(), - 'reference' => '2b18347625a2f06a1a485acfbc870f699dbe51c6', 'dev_requirement' => false, ), 'laminas/laminas-validator' => array( 'pretty_version' => '2.12.2', 'version' => '2.12.2.0', + 'reference' => '0813f234812d9fa9058b6da39eb13dedc90227db', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-validator', 'aliases' => array(), - 'reference' => '0813f234812d9fa9058b6da39eb13dedc90227db', 'dev_requirement' => false, ), 'laminas/laminas-zendframework-bridge' => array( 'pretty_version' => '1.1.1', 'version' => '1.1.1.0', + 'reference' => '6ede70583e101030bcace4dcddd648f760ddf642', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-zendframework-bridge', 'aliases' => array(), - 'reference' => '6ede70583e101030bcace4dcddd648f760ddf642', 'dev_requirement' => false, ), 'league/oauth2-client' => array( 'pretty_version' => '2.6.1', 'version' => '2.6.1.0', + 'reference' => '2334c249907190c132364f5dae0287ab8666aa19', 'type' => 'library', 'install_path' => __DIR__ . '/../league/oauth2-client', 'aliases' => array(), - 'reference' => '2334c249907190c132364f5dae0287ab8666aa19', 'dev_requirement' => false, ), 'league/oauth2-google' => array( 'pretty_version' => '3.0.4', 'version' => '3.0.4.0', + 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', 'type' => 'library', 'install_path' => __DIR__ . '/../league/oauth2-google', 'aliases' => array(), - 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', 'dev_requirement' => false, ), 'nikic/php-parser' => array( 'pretty_version' => 'v4.13.2', 'version' => '4.13.2.0', + 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), - 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077', 'dev_requirement' => false, ), 'paragonie/random_compat' => array( 'pretty_version' => 'v2.0.18', 'version' => '2.0.18.0', + 'reference' => '0a58ef6e3146256cc3dc7cc393927bcc7d1b72db', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), - 'reference' => '0a58ef6e3146256cc3dc7cc393927bcc7d1b72db', 'dev_requirement' => false, ), 'pear/archive_tar' => array( 'pretty_version' => '1.4.14', 'version' => '1.4.14.0', + 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/archive_tar', 'aliases' => array(), - 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa', 'dev_requirement' => false, ), 'pear/console_getopt' => array( 'pretty_version' => 'v1.4.3', 'version' => '1.4.3.0', + 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/console_getopt', 'aliases' => array(), - 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0', 'dev_requirement' => false, ), 'pear/pear-core-minimal' => array( 'pretty_version' => 'v1.10.10', 'version' => '1.10.10.0', + 'reference' => '625a3c429d9b2c1546438679074cac1b089116a7', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/pear-core-minimal', 'aliases' => array(), - 'reference' => '625a3c429d9b2c1546438679074cac1b089116a7', 'dev_requirement' => false, ), 'pear/pear_exception' => array( 'pretty_version' => 'v1.0.1', 'version' => '1.0.1.0', + 'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7', 'type' => 'class', 'install_path' => __DIR__ . '/../pear/pear_exception', 'aliases' => array(), - 'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7', 'dev_requirement' => false, ), 'pelago/emogrifier' => array( 'pretty_version' => 'v3.1.0', 'version' => '3.1.0.0', + 'reference' => 'f6a5c7d44612d86c3901c93f1592f5440e6b2cd8', 'type' => 'library', 'install_path' => __DIR__ . '/../pelago/emogrifier', 'aliases' => array(), - 'reference' => 'f6a5c7d44612d86c3901c93f1592f5440e6b2cd8', 'dev_requirement' => false, ), 'psr/cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', + 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'dev_requirement' => false, ), 'psr/cache-implementation' => array( @@ -259,10 +259,10 @@ 'psr/container' => array( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', + 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), - 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f', 'dev_requirement' => false, ), 'psr/container-implementation' => array( @@ -275,10 +275,10 @@ 'psr/http-message' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', + 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'dev_requirement' => false, ), 'psr/http-message-implementation' => array( @@ -290,10 +290,10 @@ 'psr/log' => array( 'pretty_version' => '1.1.2', 'version' => '1.1.2.0', + 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), - 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', 'dev_requirement' => false, ), 'psr/log-implementation' => array( @@ -305,10 +305,10 @@ 'psr/simple-cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), - 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'dev_requirement' => false, ), 'psr/simple-cache-implementation' => array( @@ -320,10 +320,10 @@ 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'dev_requirement' => false, ), 'rsky/pear-core-min' => array( @@ -335,298 +335,298 @@ 'scssphp/scssphp' => array( 'pretty_version' => '1.0.6', 'version' => '1.0.6.0', + 'reference' => '5b3c9d704950d8f9637f5110c36c281ec47dc13c', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), - 'reference' => '5b3c9d704950d8f9637f5110c36c281ec47dc13c', 'dev_requirement' => false, ), 'swiftmailer/swiftmailer' => array( 'pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', + 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c', 'type' => 'library', 'install_path' => __DIR__ . '/../swiftmailer/swiftmailer', 'aliases' => array(), - 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c', 'dev_requirement' => false, ), 'symfony/cache' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'a7a14c4832760bd1fbd31be2859ffedc9b6ff813', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache', 'aliases' => array(), - 'reference' => 'a7a14c4832760bd1fbd31be2859ffedc9b6ff813', 'dev_requirement' => false, ), 'symfony/class-loader' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'a22265a9f3511c0212bf79f54910ca5a77c0e92c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/class-loader', 'aliases' => array(), - 'reference' => 'a22265a9f3511c0212bf79f54910ca5a77c0e92c', 'dev_requirement' => false, ), 'symfony/config' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), - 'reference' => 'bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f', 'dev_requirement' => false, ), 'symfony/console' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'a10b1da6fc93080c180bba7219b5ff5b7518fe81', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), - 'reference' => 'a10b1da6fc93080c180bba7219b5ff5b7518fe81', 'dev_requirement' => false, ), 'symfony/css-selector' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'da3d9da2ce0026771f5fe64cb332158f1bd2bc33', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), - 'reference' => 'da3d9da2ce0026771f5fe64cb332158f1bd2bc33', 'dev_requirement' => false, ), 'symfony/debug' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'ab42889de57fdfcfcc0759ab102e2fd4ea72dcae', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/debug', 'aliases' => array(), - 'reference' => 'ab42889de57fdfcfcc0759ab102e2fd4ea72dcae', 'dev_requirement' => false, ), 'symfony/dependency-injection' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '51d2a2708c6ceadad84393f8581df1dcf9e5e84b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), - 'reference' => '51d2a2708c6ceadad84393f8581df1dcf9e5e84b', 'dev_requirement' => false, ), 'symfony/dotenv' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '1022723ac4f56b001d99691d96c6025dbf1404f1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dotenv', 'aliases' => array(), - 'reference' => '1022723ac4f56b001d99691d96c6025dbf1404f1', 'dev_requirement' => false, ), 'symfony/event-dispatcher' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '31fde73757b6bad247c54597beef974919ec6860', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), - 'reference' => '31fde73757b6bad247c54597beef974919ec6860', 'dev_requirement' => false, ), 'symfony/filesystem' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'e58d7841cddfed6e846829040dca2cca0ebbbbb3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), - 'reference' => 'e58d7841cddfed6e846829040dca2cca0ebbbbb3', 'dev_requirement' => false, ), 'symfony/finder' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), - 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e', 'dev_requirement' => false, ), 'symfony/framework-bundle' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '6c95e747b75ddd2af61152ce93bf87299d15710e', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/framework-bundle', 'aliases' => array(), - 'reference' => '6c95e747b75ddd2af61152ce93bf87299d15710e', 'dev_requirement' => false, ), 'symfony/http-foundation' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), - 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8', 'dev_requirement' => false, ), 'symfony/http-kernel' => array( 'pretty_version' => 'v3.4.49', 'version' => '3.4.49.0', + 'reference' => '5aa72405f5bd5583c36ed6e756acb17d3f98ac40', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), - 'reference' => '5aa72405f5bd5583c36ed6e756acb17d3f98ac40', 'dev_requirement' => false, ), 'symfony/polyfill-apcu' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => 'b44b51e7814c23bfbd793a16ead5d7ce43ed23c5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-apcu', 'aliases' => array(), - 'reference' => 'b44b51e7814c23bfbd793a16ead5d7ce43ed23c5', 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => 'aed596913b70fae57be53d86faa2e9ef85a2297b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), - 'reference' => 'aed596913b70fae57be53d86faa2e9ef85a2297b', 'dev_requirement' => false, ), 'symfony/polyfill-iconv' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => '085241787d52fa6f7a774fd034135fef0cfd5496', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-iconv', 'aliases' => array(), - 'reference' => '085241787d52fa6f7a774fd034135fef0cfd5496', 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => '4ad5115c0f5d5172a9fe8147675ec6de266d8826', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), - 'reference' => '4ad5115c0f5d5172a9fe8147675ec6de266d8826', 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => '8db0ae7936b42feb370840cf24de1a144fb0ef27', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), - 'reference' => '8db0ae7936b42feb370840cf24de1a144fb0ef27', 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => 'b5f7b932ee6fa802fc792eabd77c4c88084517ce', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), - 'reference' => 'b5f7b932ee6fa802fc792eabd77c4c88084517ce', 'dev_requirement' => false, ), 'symfony/polyfill-php56' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => 'ea19621731cbd973a6702cfedef3419768bf3372', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php56', 'aliases' => array(), - 'reference' => 'ea19621731cbd973a6702cfedef3419768bf3372', 'dev_requirement' => false, ), 'symfony/polyfill-php70' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => '3fe414077251a81a1b15b1c709faf5c2fbae3d4e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php70', 'aliases' => array(), - 'reference' => '3fe414077251a81a1b15b1c709faf5c2fbae3d4e', 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => 'beecef6b463b06954638f02378f52496cb84bacc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), - 'reference' => 'beecef6b463b06954638f02378f52496cb84bacc', 'dev_requirement' => false, ), 'symfony/polyfill-util' => array( 'pretty_version' => 'v1.19.0', 'version' => '1.19.0.0', + 'reference' => '8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-util', 'aliases' => array(), - 'reference' => '8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a', 'dev_requirement' => false, ), 'symfony/routing' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '3e522ac69cadffd8131cc2b22157fa7662331a6c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/routing', 'aliases' => array(), - 'reference' => '3e522ac69cadffd8131cc2b22157fa7662331a6c', 'dev_requirement' => false, ), 'symfony/stopwatch' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '298b81faad4ce60e94466226b2abbb8c9bca7462', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/stopwatch', 'aliases' => array(), - 'reference' => '298b81faad4ce60e94466226b2abbb8c9bca7462', 'dev_requirement' => true, ), 'symfony/twig-bridge' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '090d19d6f1ea5b9e1d79f372785aa5e5c9cd4042', 'type' => 'symfony-bridge', 'install_path' => __DIR__ . '/../symfony/twig-bridge', 'aliases' => array(), - 'reference' => '090d19d6f1ea5b9e1d79f372785aa5e5c9cd4042', 'dev_requirement' => false, ), 'symfony/twig-bundle' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '977b3096e2df96bc8a8d2329e83466cfc30c373d', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/twig-bundle', 'aliases' => array(), - 'reference' => '977b3096e2df96bc8a8d2329e83466cfc30c373d', 'dev_requirement' => false, ), 'symfony/var-dumper' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '0719f6cf4633a38b2c1585140998579ce23b4b7d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), - 'reference' => '0719f6cf4633a38b2c1585140998579ce23b4b7d', 'dev_requirement' => true, ), 'symfony/web-profiler-bundle' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => 'ccb83b3a508f4a683e44f571f127beebdc315ff9', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/web-profiler-bundle', 'aliases' => array(), - 'reference' => 'ccb83b3a508f4a683e44f571f127beebdc315ff9', 'dev_requirement' => true, ), 'symfony/yaml' => array( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', + 'reference' => '88289caa3c166321883f67fe5130188ebbb47094', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), - 'reference' => '88289caa3c166321883f67fe5130188ebbb47094', 'dev_requirement' => false, ), 'tecnickcom/tcpdf' => array( @@ -638,28 +638,28 @@ 'thenetworg/oauth2-azure' => array( 'pretty_version' => 'v2.1.1', 'version' => '2.1.1.0', + 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', 'type' => 'library', 'install_path' => __DIR__ . '/../thenetworg/oauth2-azure', 'aliases' => array(), - 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', 'dev_requirement' => false, ), 'true/punycode' => array( 'pretty_version' => 'v2.1.1', 'version' => '2.1.1.0', + 'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e', 'type' => 'library', 'install_path' => __DIR__ . '/../true/punycode', 'aliases' => array(), - 'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e', 'dev_requirement' => false, ), 'twig/twig' => array( 'pretty_version' => 'v1.42.5', 'version' => '1.42.5.0', + 'reference' => '87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e', 'type' => 'library', 'install_path' => __DIR__ . '/../twig/twig', 'aliases' => array(), - 'reference' => '87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e', 'dev_requirement' => false, ), 'zendframework/zend-loader' => array( diff --git a/lib/guzzlehttp/psr7/.github/workflows/ci.yml b/lib/guzzlehttp/psr7/.github/workflows/ci.yml index eda7dceb5..0850470e0 100644 --- a/lib/guzzlehttp/psr7/.github/workflows/ci.yml +++ b/lib/guzzlehttp/psr7/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: max-parallel: 10 matrix: @@ -21,11 +21,7 @@ jobs: extensions: mbstring - name: Checkout code - uses: actions/checkout@v2 - - - name: Mimic PHP 8.0 - run: composer config platform.php 8.0.999 - if: matrix.php > 8 + uses: actions/checkout@v3 - name: Install dependencies run: composer update --no-interaction --no-progress diff --git a/lib/guzzlehttp/psr7/.github/workflows/integration.yml b/lib/guzzlehttp/psr7/.github/workflows/integration.yml index 3c31f9ef2..a55a256ed 100644 --- a/lib/guzzlehttp/psr7/.github/workflows/integration.yml +++ b/lib/guzzlehttp/psr7/.github/workflows/integration.yml @@ -4,14 +4,13 @@ on: pull_request: jobs: - build: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1'] steps: - name: Set up PHP @@ -21,7 +20,7 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download dependencies uses: ramsey/composer-install@v1 diff --git a/lib/guzzlehttp/psr7/.github/workflows/static.yml b/lib/guzzlehttp/psr7/.github/workflows/static.yml index ab4d68ba3..f00351b68 100644 --- a/lib/guzzlehttp/psr7/.github/workflows/static.yml +++ b/lib/guzzlehttp/psr7/.github/workflows/static.yml @@ -6,11 +6,11 @@ on: jobs: php-cs-fixer: name: PHP-CS-Fixer - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/lib/guzzlehttp/psr7/CHANGELOG.md b/lib/guzzlehttp/psr7/CHANGELOG.md index b4fdf3c68..9b2b65cdb 100644 --- a/lib/guzzlehttp/psr7/CHANGELOG.md +++ b/lib/guzzlehttp/psr7/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 1.9.1 - 2023-04-17 + +### Fixed + +- Fixed header validation issue + ## 1.9.0 - 2022-06-20 ### Added diff --git a/lib/guzzlehttp/psr7/composer.json b/lib/guzzlehttp/psr7/composer.json index 0e36920db..2607f22d4 100644 --- a/lib/guzzlehttp/psr7/composer.json +++ b/lib/guzzlehttp/psr7/composer.json @@ -61,11 +61,6 @@ "GuzzleHttp\\Tests\\Psr7\\": "tests/" } }, - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "config": { "preferred-install": "dist", "sort-packages": true, diff --git a/lib/guzzlehttp/psr7/src/MessageTrait.php b/lib/guzzlehttp/psr7/src/MessageTrait.php index 0ac8663da..0bbd63e0d 100644 --- a/lib/guzzlehttp/psr7/src/MessageTrait.php +++ b/lib/guzzlehttp/psr7/src/MessageTrait.php @@ -226,12 +226,9 @@ trait MessageTrait throw new \InvalidArgumentException('Header name can not be empty.'); } - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) { + if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { throw new \InvalidArgumentException( - sprintf( - '"%s" is not valid header name', - $header - ) + sprintf('"%s" is not valid header name.', $header) ); } } @@ -263,8 +260,10 @@ trait MessageTrait // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. - if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) { - throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value)); + if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { + throw new \InvalidArgumentException( + sprintf('"%s" is not valid header value.', $value) + ); } } } From 70e6f707c490254e4280ab399672b05546326639 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 7 Jun 2023 17:23:47 +0200 Subject: [PATCH 8/9] Merge remote-tracking branch 'origin/support/2.7' into support/3.0 -> composer autoloader --- lib/autoload.php | 5 ----- lib/composer/ClassLoader.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_static.php | 8 ++++---- lib/composer/include_paths.php | 2 +- 8 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/autoload.php b/lib/autoload.php index 743c6b6d6..f37a5b80e 100644 --- a/lib/autoload.php +++ b/lib/autoload.php @@ -2,11 +2,6 @@ // 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 ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239::getLoader(); diff --git a/lib/composer/ClassLoader.php b/lib/composer/ClassLoader.php index afef3fa2a..0cd6055d1 100644 --- a/lib/composer/ClassLoader.php +++ b/lib/composer/ClassLoader.php @@ -149,7 +149,7 @@ class ClassLoader /** * @return string[] Array of classname => path - * @psalm-return array + * @psalm-var array */ public function getClassMap() { diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index c903ec99f..0dc29f123 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(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php index ae02e5199..7be757bea 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(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $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', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/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', '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 e6117c750..d12922d08 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(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php index 651c9f0c1..ca8b4b9f6 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(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index eb0882345..026b5cc7c 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -8,21 +8,21 @@ class ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239 { 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', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/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', '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 af33c1491..d4fb96718 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(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( From 0fbd41a8847f6879ae80c883018c519735f117b4 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 7 Jun 2023 17:30:39 +0200 Subject: [PATCH 9/9] Merge remote-tracking branch 'origin/support/2.7' into support/3.0 -> fix syntax error --- synchro/synchro_exec.php | 63 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/synchro/synchro_exec.php b/synchro/synchro_exec.php index 3946b66b7..08174954d 100644 --- a/synchro/synchro_exec.php +++ b/synchro/synchro_exec.php @@ -102,51 +102,49 @@ if (utils::IsModeCLI()) exit -1; } } -else -{ +else { require_once(APPROOT.'/application/loginwebpage.class.inc.php'); //N°6022 - Make synchro scripts work by http via token authentication with SYNCHRO scopes $oCtx = new ContextTag(ContextTag::TAG_SYNCHRO); - LoginWebPage::ResetSession(true); + LoginWebPage::ResetSession(true); $iRet = LoginWebPage::DoLogin(false, false, LoginWebPage::EXIT_RETURN); - if ($iRet !== LoginWebPage::EXIT_CODE_OK) { - switch ($iRet) { - case LoginWebPage::EXIT_CODE_MISSINGLOGIN: - $oP->p("Missing parameter 'auth_user'"); - break; + if ($iRet !== LoginWebPage::EXIT_CODE_OK) { + switch ($iRet) { + case LoginWebPage::EXIT_CODE_MISSINGLOGIN: + $oP->p("Missing parameter 'auth_user'"); + break; - case LoginWebPage::EXIT_CODE_MISSINGPASSWORD: - $oP->p("Missing parameter 'auth_pwd'"); - break; + case LoginWebPage::EXIT_CODE_MISSINGPASSWORD: + $oP->p("Missing parameter 'auth_pwd'"); + break; - case LoginWebPage::EXIT_CODE_WRONGCREDENTIALS: - $oP->p('Invalid login'); - break; + case LoginWebPage::EXIT_CODE_WRONGCREDENTIALS: + $oP->p('Invalid login'); + break; - case LoginWebPage::EXIT_CODE_PORTALUSERNOTAUTHORIZED: - $oP->p('Portal user is not allowed'); - break; + case LoginWebPage::EXIT_CODE_PORTALUSERNOTAUTHORIZED: + $oP->p('Portal user is not allowed'); + break; - case LoginWebPage::EXIT_CODE_NOTAUTHORIZED: - $oP->p('This user is not authorized to use the web services. (The profile REST Services User is required to access the REST web services)'); - break; + case LoginWebPage::EXIT_CODE_NOTAUTHORIZED: + $oP->p('This user is not authorized to use the web services. (The profile REST Services User is required to access the REST web services)'); + break; - default: - $oP->p("Unknown authentication error (retCode=$iRet)"); - } - $oP->output(); - exit -1; - } + default: + $oP->p("Unknown authentication error (retCode=$iRet)"); + } + $oP->output(); + exit - 1; + } -$bSimulate = (utils::ReadParam('simulate', '0', true) == '1'); -$sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas + $bSimulate = (utils::ReadParam('simulate', '0', true) == '1'); + $sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas -if ($sDataSourcesList == null) -{ - UsageAndExit($oP); + if ($sDataSourcesList == null) { + UsageAndExit($oP); + } } - foreach(explode(',', $sDataSourcesList) as $iSDS) { $oSynchroDataSource = MetaModel::GetObject('SynchroDataSource', $iSDS, false); @@ -206,4 +204,3 @@ foreach(explode(',', $sDataSourcesList) as $iSDS) } $oP->output(); -?>