diff --git a/CHANGELOG b/CHANGELOG index 3a304791..b1e25c8c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -64,7 +64,7 @@ v3.5.0 * [#433](https://github.com/onelogin/php-saml/issues/443) Fix Incorrect Destination in LogoutResponse when using responseUrl #443 * Update xmlseclibs to 3.1.1 * Add support for SMARTCARD_PKI and RSA_TOKEN Auth Contexts -* Get lib path dinamically +* Get lib path dynamically * Check for x509Cert of the IdP when loading settings, even if the security index was not provided * Support Statements with Attribute elements with the same name enabling the allowRepeatAttributeName setting @@ -87,7 +87,7 @@ v.3.3.1 v.3.3.0 * Set true as the default value for strict setting -* Relax comparision of false on SignMetadata +* Relax comparison of false on SignMetadata * Fix CI v.3.2.1 @@ -203,7 +203,7 @@ v.2.12.0 * [#263](https://github.com/onelogin/php-saml/issues/263) Fix incompatibility with ADFS on SLO. When on php saml settings NameID Format is set as unspecified but the SAMLResponse has no NameID Format, no NameID Format should be specified on LogoutRequest. v.2.11.0 -* [#236](https://github.com/onelogin/php-saml/pull/236) Exclude unnecesary files from Composer production downloads +* [#236](https://github.com/onelogin/php-saml/pull/236) Exclude unnecessary files from Composer production downloads * [#226](https://github.com/onelogin/php-saml/pull/226) Add possibility to handle nameId NameQualifier attribute in SLO Request * Improve logout documentation on Readme. * Improve multi-certificate support @@ -316,7 +316,7 @@ v.2.6.1 ------- * Fix bug on cacheDuration of the Metadata XML generated. * Make SPNameQualifier optional on the generateNameId method. Avoid the use of SPNameQualifier when generating the NameID on the LogoutRequest builder. -* Allows the authn comparsion attribute to be set via config. +* Allows the authn comparison attribute to be set via config. * Retrieve Session Timeout after processResponse with getSessionExpiration(). * Improve readme readability. * Allow single log out to work for applications not leveraging php session_start. Added a callback parameter in order to close the session at processSLO. @@ -334,8 +334,8 @@ v.2.6.0 v.2.5.0 ------- -* Do accesible the ID of the object Logout Request (id attribute). -* Add note about the fact that PHP 5.3 is unssuported. +* Do accessible the ID of the object Logout Request (id attribute). +* Add note about the fact that PHP 5.3 is unsupported. * Add fingerprint algorithm support. * Add dependences to composer. @@ -363,7 +363,7 @@ v.2.2.0 ------- * Fix bug with Encrypted nameID on LogoutRequest. * Fixed usability bug. SP will inform about AuthFail status after process a Response. -* Added SessionIndex support on LogoutRequest, and know is accesible from the Auth class. +* Added SessionIndex support on LogoutRequest, and know is accessible from the Auth class. * LogoutRequest and LogoutResponse classes now accept non deflated xml. * Improved the XML metadata/ Decrypted Assertion output. (prettyprint). * Fix bug in formatPrivateKey method, the key could be not RSA. diff --git a/README.md b/README.md index 67c50ede..951068b8 100644 --- a/README.md +++ b/README.md @@ -160,14 +160,14 @@ a trusted and expected URL. Read more about Open Redirect [CWE-601](https://cwe.mitre.org/data/definitions/601.html). -### Avoiding Reply attacks ### +### Avoiding Replay attacks ### -A reply attack is basically try to reuse an intercepted valid SAML Message in order to impersonate a SAML action (SSO or SLO). +A replay attack is basically try to reuse an intercepted valid SAML Message in order to impersonate a SAML action (SSO or SLO). SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that make harder this kind of attacks, but they are still possible. -In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs alredy valdidated and processed. Those values only need +In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs alredy validated and processed. Those values only need to be stored the amount of time of the SAML Message life time, so we don't need to store all processed message/assertion Ids, but the most recent ones. @@ -507,7 +507,7 @@ $advancedSettings = array( // If true, Destination URL should strictly match to the address to // which the response has been sent. - // Notice that if 'relaxDestinationValidation' is true an empty Destintation + // Notice that if 'relaxDestinationValidation' is true an empty Destination // will be accepted. 'destinationStrictlyMatches' => false, @@ -515,7 +515,7 @@ $advancedSettings = array( // contain atribute elements with name duplicated 'allowRepeatAttributeName' => false, - // If true, SAMLResponses with an InResponseTo value will be rejectd if not + // If true, SAMLResponses with an InResponseTo value will be rejected if not // AuthNRequest ID provided to the validation method. 'rejectUnsolicitedResponsesWithInResponseTo' => false, @@ -566,7 +566,7 @@ $advancedSettings = array( ), // Organization information template, the info in en_US lang is - // recomended, add more if required. + // recommended, add more if required. 'organization' => array( 'en-US' => array( 'name' => '', @@ -909,7 +909,7 @@ $auth->processSLO(false, $requestID); $errors = $auth->getErrors(); if (empty($errors)) { - echo 'Sucessfully logged out'; + echo 'Successfully logged out'; } else { echo implode(', ', $errors); } @@ -1116,7 +1116,7 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I echo '

' . implode(', ', $errors) . '

'; } // This check if the response was - if (!$auth->isAuthenticated()) { // sucessfully validated and the user + if (!$auth->isAuthenticated()) { // successfully validated and the user echo '

Not authenticated

'; // data retrieved or not exit(); } @@ -1131,7 +1131,7 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I $auth->processSLO(); // Process the Logout Request & Logout Response $errors = $auth->getErrors(); // Retrieves possible validation errors if (empty($errors)) { - echo '

Sucessfully logged out

'; + echo '

Successfully logged out

'; } else { echo '

' . htmlentities(implode(', ', $errors)) . '

'; } @@ -1302,7 +1302,7 @@ SAML 2 Authentication Response class SAML 2 Logout Request class * `LogoutRequest` - Constructs the Logout Request object. - * `getRequest` - Returns the Logout Request defated, base64encoded, unsigned + * `getRequest` - Returns the Logout Request deflated, base64encoded, unsigned * `getID` - Returns the ID of the Logout Request. (If you have the object you can access to the id attribute) * `getNameIdData` - Gets the NameID Data of the the Logout Request. * `getNameId` - Gets the NameID of the Logout Request. @@ -1369,7 +1369,7 @@ A class that contains functionality related to the metadata of the SP * `builder` - Generates the metadata of the SP based on the settings. * `signmetadata` - Signs the metadata with the key/cert provided -* `addX509KeyDescriptors` - Adds the x509 descriptors (sign/encriptation) to +* `addX509KeyDescriptors` - Adds the x509 descriptors (sign/encryption) to the metadata ##### OneLogin\Saml2\Utils - `Utils.php` ##### diff --git a/advanced_settings_example.php b/advanced_settings_example.php index d9c16e28..6336d965 100644 --- a/advanced_settings_example.php +++ b/advanced_settings_example.php @@ -87,7 +87,7 @@ // If true, Destination URL should strictly match to the address to // which the response has been sent. - // Notice that if 'relaxDestinationValidation' is true an empty Destintation + // Notice that if 'relaxDestinationValidation' is true an empty Destination // will be accepted. 'destinationStrictlyMatches' => false, @@ -95,7 +95,7 @@ // contain atribute elements with name duplicated 'allowRepeatAttributeName' => false, - // If true, SAMLResponses with an InResponseTo value will be rejectd if not + // If true, SAMLResponses with an InResponseTo value will be rejected if not // AuthNRequest ID provided to the validation method. 'rejectUnsolicitedResponsesWithInResponseTo' => false, @@ -132,7 +132,7 @@ 'lowercaseUrlencoding' => false, ), - // Contact information template, it is recommended to suply a technical and support contacts + // Contact information template, it is recommended to supply a technical and support contacts 'contactPerson' => array( 'technical' => array( 'givenName' => '', @@ -144,7 +144,7 @@ ), ), - // Organization information template, the info in en_US lang is recomended, add more if required + // Organization information template, the info in en_US lang is recommended, add more if required 'organization' => array( 'en-US' => array( 'name' => '', diff --git a/demo1/Readme.txt b/demo1/Readme.txt index 7fcc57d4..92092312 100644 --- a/demo1/Readme.txt +++ b/demo1/Readme.txt @@ -45,7 +45,7 @@ How it works process, the index.php view. 2.2 in the second link we access to (attrs.php) have the same process - described at 2.1 with the diference that as RelayState is set the attrs.php + described at 2.1 with the difference that as RelayState is set the attrs.php 3. The SAML Response is processed in the ACS (index.php?acs), if the Response is not valid, the process stop here and a message is showed. Otherwise we @@ -68,7 +68,7 @@ How it works Request to the SP (SLS endpoint, index.php?sls). The SLS endpoint of the SP process the Logout Request and if is valid, close the session of the user at the local app and send a Logout Response to the IdP (to the SLS endpoint - of the IdP). The IdP recieve the Logout Response, process it and close the + of the IdP). The IdP receive the Logout Response, process it and close the session at of the IdP. Notice that the SLO Workflow starts and ends at the IdP. Notice that all the SAML Requests and Responses are handler at a unique file, diff --git a/demo1/index.php b/demo1/index.php index 4ad32ada..5156e8f0 100644 --- a/demo1/index.php +++ b/demo1/index.php @@ -1,5 +1,5 @@ processSLO(false, $requestID); $errors = $auth->getErrors(); if (empty($errors)) { - echo '

Sucessfully logged out

'; + echo '

Successfully logged out

'; } else { echo '

' . htmlentities(implode(', ', $errors)) . '

'; if ($auth->getSettings()->isDebugActive()) { diff --git a/demo2/Readme.txt b/demo2/Readme.txt index b969e670..0e1cdde0 100644 --- a/demo2/Readme.txt +++ b/demo2/Readme.txt @@ -8,7 +8,7 @@ The Onelogin's PHP Toolkit allows you to provide the settings info in 2 ways: toolkit. * Use an array with the setting data. -The first is the case of the demo2 app. The setting.php file and the +The first is the case of the demo2 app. The setting.php file and the setting_extended.php file should be defined at the base folder of the toolkit. Review the setting_example.php and the advanced_settings_example.php to learn how to build them. @@ -44,17 +44,17 @@ demo1, only changes the targets. sent to the IdP automatically, (as RelayState is sent the origin url). We authenticate at the IdP and then a Response is sent to the SP, to the ACS endpoint, in this case acs.php of the endpoints folder. - + 2. The SAML Response is processed in the ACS, if the Response is not valid, the process stop here and a message is showed. Otherwise we are redirected to the RelayState view (sso.php or index.php). The sso.php detect if the user is logged and do a redirect to index.php, so we will be in the index.php at the end. - 3. We are logged in the app and the user attributes are showed. + 3. We are logged in the app and the user attributes are showed. At this point, we can test the single log out functionality. - 4. The single log out funcionality could be tested by 2 ways. + 4. The single log out functionality could be tested by 2 ways. 4.1 SLO Initiated by SP. Click on the "logout" link at the SP, after that we are redirected to the slo.php view and there a Logout Request is sent @@ -63,14 +63,12 @@ demo1, only changes the targets. The SLS endpoint of the SP process the Logout Response and if is valid, close the user session of the local app. Notice that the SLO Workflow starts and ends at the SP. - + 5.2 SLO Initiated by IdP. In this case, the action takes place on the IdP - side, the logout process is initiated at the idP, sends a Logout + side, the logout process is initiated at the idP, sends a Logout Request to the SP (SLS endpoint sls.php of the endpoint folder). The SLS endpoint of the SP process the Logout Request and if is valid, close the session of the user at the local app and sends a Logout Response - to the IdP (to the SLS endpoint of the IdP).The IdP recieves the Logout + to the IdP (to the SLS endpoint of the IdP).The IdP receives the Logout Response, process it and close the session at of the IdP. Notice that the SLO Workflow starts and ends at the IdP. - - diff --git a/endpoints/sls.php b/endpoints/sls.php index 40c04f5b..0f522489 100644 --- a/endpoints/sls.php +++ b/endpoints/sls.php @@ -1,5 +1,5 @@ getErrors(); if (empty($errors)) { - echo 'Sucessfully logged out'; + echo 'Successfully logged out'; } else { echo htmlentities(implode(', ', $errors)); } diff --git a/src/Saml2/LogoutRequest.php b/src/Saml2/LogoutRequest.php index 1821113d..1e539105 100644 --- a/src/Saml2/LogoutRequest.php +++ b/src/Saml2/LogoutRequest.php @@ -155,7 +155,7 @@ public function __construct(\OneLogin\Saml2\Settings $settings, $request = null, } /** - * Returns the Logout Request defated, base64encoded, unsigned + * Returns the Logout Request deflated, base64encoded, unsigned * * @param bool|null $deflate Whether or not we should 'gzdeflate' the request body before we return it. * diff --git a/src/Saml2/LogoutResponse.php b/src/Saml2/LogoutResponse.php index 8bb44345..64e373c1 100644 --- a/src/Saml2/LogoutResponse.php +++ b/src/Saml2/LogoutResponse.php @@ -235,7 +235,7 @@ public function isValid($requestId = null, $retrieveParametersFromServer = false } /** - * Extracts a node from the DOMDocument (Logout Response Menssage) + * Extracts a node from the DOMDocument (Logout Response Message) * * @param string $query Xpath Expression * diff --git a/src/Saml2/Response.php b/src/Saml2/Response.php index b987ca44..7523f6cb 100644 --- a/src/Saml2/Response.php +++ b/src/Saml2/Response.php @@ -245,7 +245,7 @@ public function isValid($requestId = null) ); } - // Validate Asserion timestamps + // Validate Assertion timestamps $this->validateTimestamps(); // Validate AuthnStatement element exists and is unique @@ -1007,9 +1007,9 @@ public function validateSignedElements($signedElements) $responseTag = '{'.Constants::NS_SAMLP.'}Response'; $assertionTag = '{'.Constants::NS_SAML.'}Assertion'; - $ocurrence = array_count_values($signedElements); - if ((in_array($responseTag, $signedElements) && $ocurrence[$responseTag] > 1) - || (in_array($assertionTag, $signedElements) && $ocurrence[$assertionTag] > 1) + $occurrence = array_count_values($signedElements); + if ((in_array($responseTag, $signedElements) && $occurrence[$responseTag] > 1) + || (in_array($assertionTag, $signedElements) && $occurrence[$assertionTag] > 1) || !in_array($responseTag, $signedElements) && !in_array($assertionTag, $signedElements) ) { return false; @@ -1092,7 +1092,7 @@ protected function _queryAssertion($assertionXpath) } /** - * Extracts nodes that match the query from the DOMDocument (Response Menssage) + * Extracts nodes that match the query from the DOMDocument (Response Message) * * @param string $query Xpath Expression * diff --git a/src/Saml2/Settings.php b/src/Saml2/Settings.php index c7d01c0b..0ca095a9 100644 --- a/src/Saml2/Settings.php +++ b/src/Saml2/Settings.php @@ -661,7 +661,7 @@ public function checkSPSettings(array $settings) if (!isset($contact['givenName']) || empty($contact['givenName']) || !isset($contact['emailAddress']) || empty($contact['emailAddress']) ) { - $errors[] = 'contact_not_enought_data'; + $errors[] = 'contact_not_enough_data'; break; } } @@ -673,7 +673,7 @@ public function checkSPSettings(array $settings) || !isset($organization['displayname']) || empty($organization['displayname']) || !isset($organization['url']) || empty($organization['url']) ) { - $errors[] = 'organization_not_enought_data'; + $errors[] = 'organization_not_enough_data'; break; } } @@ -1037,7 +1037,7 @@ public function formatIdPCert() } /** - * Formats the Multple IdP certs. + * Formats the Multiple IdP certs. */ public function formatIdPCertMulti() { diff --git a/src/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd b/src/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd index 8513959a..d669d91b 100644 --- a/src/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd +++ b/src/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd @@ -1,5 +1,5 @@ - @@ -10,7 +10,7 @@ Location: http://docs.oasis-open.org/security/saml/v2.0/ Revision history: V2.0 (March, 2005): - New core authentication context schema types for SAML V2.0. + New core authentication context schema types for SAML V2.0. @@ -63,7 +63,7 @@ - Refers to those characterstics that describe how the + Refers to those characteristics that describe how the 'secret' (the knowledge or possession of which allows the Principal to authenticate to the Authentication Authority) is kept secure @@ -402,7 +402,7 @@ - + @@ -429,12 +429,12 @@ This element indicates that the Authenticator has been - transmitted using a transport mechnanism protected by an SSL or TLS + transmitted using a transport mechanism protected by an SSL or TLS session. - + @@ -483,7 +483,7 @@ - + @@ -550,7 +550,7 @@ - + @@ -569,7 +569,7 @@ - + @@ -595,14 +595,14 @@ - + - + @@ -665,7 +665,7 @@ - + @@ -690,41 +690,41 @@ - + - + - + - + - + - + @@ -732,7 +732,7 @@ - + @@ -741,7 +741,7 @@ - + @@ -750,7 +750,7 @@ - + @@ -759,17 +759,17 @@ - + - + - + - + @@ -809,7 +809,7 @@ - + diff --git a/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php b/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php index 20a1a7c7..381f9f78 100644 --- a/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php +++ b/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php @@ -56,11 +56,11 @@ public function process(File $phpcsFile, $stackPtr) // There is the possibility to pass "--ide" as an option to the analyzer. // This would result in an output format which would be easier to parse. - // The problem here is that no cleartext error messages are returnwd; only + // The problem here is that no cleartext error messages are returned; only // error-code-labels. So for a start we go for cleartext output. $exitCode = exec($cmd, $output, $retval); - // Variable $exitCode is the last line of $output if no error occures, on + // Variable $exitCode is the last line of $output if no error occurs, on // error it is numeric. Try to handle various error conditions and // provide useful error reporting. if (is_numeric($exitCode) === true && $exitCode > 0) { diff --git a/tests/ZendModStandard/ruleset.xml b/tests/ZendModStandard/ruleset.xml index 80c14224..2a3eddc4 100644 --- a/tests/ZendModStandard/ruleset.xml +++ b/tests/ZendModStandard/ruleset.xml @@ -1,6 +1,6 @@ - A coding standard based on an early Zend Framework coding standard. Note that this standard is out of date. And removed the line lenght limitation + A coding standard based on an early Zend Framework coding standard. Note that this standard is out of date. And removed the line length limitation diff --git a/tests/data/metadata/idp/idp_metadata_multi_certs.xml b/tests/data/metadata/idp/idp_metadata_multi_certs.xml index f993f64a..d4e27111 100644 --- a/tests/data/metadata/idp/idp_metadata_multi_certs.xml +++ b/tests/data/metadata/idp/idp_metadata_multi_certs.xml @@ -1,5 +1,5 @@ - + @@ -68,8 +68,8 @@ WQO0LPxPqRiUqUzyhDhLo/xXNrHCu4VbMw== - + urn:oasis:names:tc:SAML:2.0:nameid-format:transient - + - \ No newline at end of file + diff --git a/tests/data/metadata/idp/idp_metadata_multi_signing_certs.xml b/tests/data/metadata/idp/idp_metadata_multi_signing_certs.xml index 0cba257a..70bfa163 100644 --- a/tests/data/metadata/idp/idp_metadata_multi_signing_certs.xml +++ b/tests/data/metadata/idp/idp_metadata_multi_signing_certs.xml @@ -1,5 +1,5 @@ - + @@ -68,8 +68,8 @@ WQO0LPxPqRiUqUzyhDhLo/xXNrHCu4VbMw== - + urn:oasis:names:tc:SAML:2.0:nameid-format:transient - + diff --git a/tests/data/metadata/idp/metadata.xml b/tests/data/metadata/idp/metadata.xml index c2ca6739..decf301e 100644 --- a/tests/data/metadata/idp/metadata.xml +++ b/tests/data/metadata/idp/metadata.xml @@ -1,5 +1,5 @@ - + @@ -68,8 +68,8 @@ WQO0LPxPqRiUqUzyhDhLo/xXNrHCu4VbMw== - + urn:oasis:names:tc:SAML:2.0:nameid-format:transient - + - \ No newline at end of file + diff --git a/tests/data/metadata/idp/shib_metadata.xml b/tests/data/metadata/idp/shib_metadata.xml index 5196db56..0a5c935e 100644 --- a/tests/data/metadata/idp/shib_metadata.xml +++ b/tests/data/metadata/idp/shib_metadata.xml @@ -1,6 +1,6 @@ @@ -296,4 +296,4 @@ QZfzDc9Vmm18OJtspKB74+x7JkNv6iszqOH6gvzq4qvkRw== mailto:stv@fccn.pt - \ No newline at end of file + diff --git a/tests/src/OneLogin/Saml2/AuthTest.php b/tests/src/OneLogin/Saml2/AuthTest.php index 193f3e78..185c88c4 100644 --- a/tests/src/OneLogin/Saml2/AuthTest.php +++ b/tests/src/OneLogin/Saml2/AuthTest.php @@ -394,7 +394,7 @@ public function testGetAttributes() /** * Tests the redirectTo method of the Auth class * (phpunit raises an exception when a redirect is executed, the - * exception is catched and we check that the targetURL is correct) + * exception is caught and we check that the targetURL is correct) * Case redirect without url parameter * * @covers OneLogin\Saml2\Auth::redirectTo @@ -411,7 +411,7 @@ public function testRedirectTo() /** * Tests the redirectTo method of the Auth class * (phpunit raises an exception when a redirect is executed, the - * exception is catched and we check that the targetURL is correct) + * exception is caught and we check that the targetURL is correct) * Case redirect with url parameter * * @covers OneLogin\Saml2\Auth::redirectTo @@ -471,7 +471,7 @@ public function testProcessSLOResponseInvalid() /** * Tests the processSLO method of the Auth class - * Case Logout Response not sucess + * Case Logout Response not success * * @covers OneLogin\Saml2\Auth::processSLO */ diff --git a/tests/src/OneLogin/Saml2/IdPMetadataParserTest.php b/tests/src/OneLogin/Saml2/IdPMetadataParserTest.php index 0ba69edc..c95cbd56 100644 --- a/tests/src/OneLogin/Saml2/IdPMetadataParserTest.php +++ b/tests/src/OneLogin/Saml2/IdPMetadataParserTest.php @@ -67,14 +67,14 @@ public function testParseXML() { $expectedInfo = array( 'idp' => array( - 'entityId' => 'https://idp.examle.com/saml/metadata', + 'entityId' => 'https://idp.example.com/saml/metadata', 'singleSignOnService' => array( - 'url' => 'https://idp.examle.com/saml/sso', + 'url' => 'https://idp.example.com/saml/sso', 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' ), 'singleLogoutService' => array( - 'url' => 'https://idp.examle.com/saml/slo', - 'responseUrl' => 'https://idp.examle.com/saml/slr', + 'url' => 'https://idp.example.com/saml/slo', + 'responseUrl' => 'https://idp.example.com/saml/slr', 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' ), 'x509certMulti' => array( @@ -296,7 +296,7 @@ public function testParseMultiCerts() ), "idp" => array( "singleLogoutService" => array( - "url" => "https://idp.examle.com/saml/slo", + "url" => "https://idp.example.com/saml/slo", "binding" => "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" ), "x509certMulti" => array( @@ -308,9 +308,9 @@ public function testParseMultiCerts() "MIICZDCCAc2gAwIBAgIBADANBgkqhkiG9w0BAQ0FADBPMQswCQYDVQQGEwJ1czEUMBIGA1UECAwLZXhhbXBsZS5jb20xFDASBgNVBAoMC2V4YW1wbGUuY29tMRQwEgYDVQQDDAtleGFtcGxlLmNvbTAeFw0xNzA0MTUxNjMzMThaFw0xODA0MTUxNjMzMThaME8xCzAJBgNVBAYTAnVzMRQwEgYDVQQIDAtleGFtcGxlLmNvbTEUMBIGA1UECgwLZXhhbXBsZS5jb20xFDASBgNVBAMMC2V4YW1wbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6GLkl5lDUZdHNDAojp5i24OoPlqrt5TGXJIPqAZYT1hQvJW5nv17MFDHrjmtEnmW4ACKEy0fAX80QWIcHunZSkbEGHb+NG/6oTi5RipXMvmHnfFnPJJ0AdtiLiPE478CV856gXekV4Xx5u3KrylcOgkpYsp0GMIQBDzleMUXlYQIDAQABo1AwTjAdBgNVHQ4EFgQUnP8vlYPGPL2n6ZzDYij2kMDC8wMwHwYDVR0jBBgwFoAUnP8vlYPGPL2n6ZzDYij2kMDC8wMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQ0FAAOBgQAlQGAl+b8Cpot1g+65lLLjVoY7APJPWLW0klKQNlMU0s4MU+71Y3ExUEOXDAZgKcFoavb1fEOGMwEf38NaJAy1e/l6VNuixXShffq20ymqHQxOG0q8ujeNkgZF9k6XDfn/QZ3AD0o/IrCT7UMc/0QsfgIjWYxwCvp2syApc5CYfQ==" ) ), - "entityId" => "https://idp.examle.com/saml/metadata", + "entityId" => "https://idp.example.com/saml/metadata", "singleSignOnService" => array( - "url" => "https://idp.examle.com/saml/sso", + "url" => "https://idp.example.com/saml/sso", "binding" => "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" ) ) @@ -333,7 +333,7 @@ public function testParseMultiSigningCerts() ), "idp" => array( "singleLogoutService" => array( - "url" => "https://idp.examle.com/saml/slo", + "url" => "https://idp.example.com/saml/slo", "binding" => "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" ), "x509certMulti" => array( @@ -343,9 +343,9 @@ public function testParseMultiSigningCerts() "MIIEZTCCA02gAwIBAgIUPyy/A3bZAZ4m28PzEUUoT7RJhxIwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UEBhMCVVMxKzApBgNVBAoMIk9uZUxvZ2luIFRlc3QgKHNnYXJjaWEtdXMtcHJlcHJvZCkxFTATBgNVBAsMDE9uZUxvZ2luIElkUDEfMB0GA1UEAwwWT25lTG9naW4gQWNjb3VudCA4OTE0NjAeFw0xNjA4MDQyMjI5MzdaFw0yMTA4MDUyMjI5MzdaMHIxCzAJBgNVBAYTAlVTMSswKQYDVQQKDCJPbmVMb2dpbiBUZXN0IChzZ2FyY2lhLXVzLXByZXByb2QpMRUwEwYDVQQLDAxPbmVMb2dpbiBJZFAxHzAdBgNVBAMMFk9uZUxvZ2luIEFjY291bnQgODkxNDYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDN6iqQGcLOCglNO42I2rkzE05UXSiMXT6c8ALThMMiaDw6qqzo3sd/tKK+NcNKWLIIC8TozWVyh5ykUiVZps+08xil7VsTU7E+wKu3kvmOsvw2wlRwtnoKZJwYhnr+RkBa+h1r3ZYUgXm1ZPeHMKj1g18KaWz9+MxYL6BhKqrOzfW/P2xxVRcFH7/pq+ZsDdgNzD2GD+apzY4MZyZj/N6BpBWJ0GlFsmtBegpbX3LBitJuFkk5L4/U/jjF1AJa3boBdCUVfATqO5G03H4XS1GySjBIRQXmlUF52rLjg6xCgWJ30/+t1X+IHLJeixiQ0vxyh6C4/usCEt94cgD1r8ADAgMBAAGjgfIwge8wDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUPW0DcH0G3IwynWgi74co4wZ6n7gwga8GA1UdIwSBpzCBpIAUPW0DcH0G3IwynWgi74co4wZ6n7ihdqR0MHIxCzAJBgNVBAYTAlVTMSswKQYDVQQKDCJPbmVMb2dpbiBUZXN0IChzZ2FyY2lhLXVzLXByZXByb2QpMRUwEwYDVQQLDAxPbmVMb2dpbiBJZFAxHzAdBgNVBAMMFk9uZUxvZ2luIEFjY291bnQgODkxNDaCFD8svwN22QGeJtvD8xFFKE+0SYcSMA4GA1UdDwEB/wQEAwIHgDANBgkqhkiG9w0BAQUFAAOCAQEAQhB4q9jrycwbHrDSoYR1X4LFFzvJ9Us75wQquRHXpdyS9D6HUBXMGI6ahPicXCQrfLgN8vzMIiqZqfySXXv/8/dxe/X4UsWLYKYJHDJmxXD5EmWTa65chjkeP1oJAc8f3CKCpcP2lOBTthbnk2fEVAeLHR4xNdQO0VvGXWO9BliYPpkYqUIBvlm+Fg9mF7AM/Uagq2503XXIE1Lq//HON68P10vNMwLSKOtYLsoTiCnuIKGJqG37MsZVjQ1ZPRcO+LSLkq0i91gFxrOrVCrgztX4JQi5XkvEsYZGIXXjwHqxTVyt3adZWQO0LPxPqRiUqUzyhDhLo/xXNrHCu4VbMw==" ) ), - "entityId" => "https://idp.examle.com/saml/metadata", + "entityId" => "https://idp.example.com/saml/metadata", "singleSignOnService" => array( - "url" => "https://idp.examle.com/saml/sso", + "url" => "https://idp.example.com/saml/sso", "binding" => "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" ) ) @@ -449,7 +449,7 @@ public function testInjectIntoSettings() $idpInfo = IdPMetadataParser::parseXML($xml); $newSettings = IdPMetadataParser::injectIntoSettings($settingsInfo, $idpInfo); - + $this->assertNotEquals($newSettings, $settingsInfo); $this->assertEquals($expectedMergedSettings, $newSettings); } diff --git a/tests/src/OneLogin/Saml2/ResponseTest.php b/tests/src/OneLogin/Saml2/ResponseTest.php index 258313a6..d5c22199 100644 --- a/tests/src/OneLogin/Saml2/ResponseTest.php +++ b/tests/src/OneLogin/Saml2/ResponseTest.php @@ -1353,7 +1353,7 @@ public function testIsInValidSubjectConfirmation() } /** - * Somtimes IdPs uses datetimes with miliseconds, this + * Sometimes IdPs uses datetimes with milliseconds, this * test is to verify that the toolkit supports them * * @covers OneLogin\Saml2\Response::isValid diff --git a/tests/src/OneLogin/Saml2/SettingsTest.php b/tests/src/OneLogin/Saml2/SettingsTest.php index 8d144e58..64e0c3e1 100644 --- a/tests/src/OneLogin/Saml2/SettingsTest.php +++ b/tests/src/OneLogin/Saml2/SettingsTest.php @@ -416,7 +416,7 @@ public function testCheckSettings() $this->fail('Error was not raised'); } catch (Error $e) { $this->assertStringContainsString('sp_signMetadata_invalid', $e->getMessage()); - $this->assertStringContainsString('organization_not_enought_data', $e->getMessage()); + $this->assertStringContainsString('organization_not_enough_data', $e->getMessage()); $this->assertStringContainsString('contact_type_invalid', $e->getMessage()); } @@ -427,7 +427,7 @@ public function testCheckSettings() $this->fail('Error was not raised'); } catch (Error $e) { $this->assertStringContainsString('sp_signMetadata_invalid', $e->getMessage()); - $this->assertStringContainsString('organization_not_enought_data', $e->getMessage()); + $this->assertStringContainsString('organization_not_enough_data', $e->getMessage()); $this->assertStringContainsString('contact_type_invalid', $e->getMessage()); } } diff --git a/tests/src/OneLogin/Saml2/UtilsTest.php b/tests/src/OneLogin/Saml2/UtilsTest.php index 0471c8a6..09ac3f29 100644 --- a/tests/src/OneLogin/Saml2/UtilsTest.php +++ b/tests/src/OneLogin/Saml2/UtilsTest.php @@ -754,7 +754,7 @@ public function testParseSAML2Time() $this->assertStringContainsString('Invalid SAML2 timestamp passed', $e->getMessage()); } - // Now test if toolkit supports miliseconds + // Now test if toolkit supports milliseconds $SAMLTime2 = '2013-12-10T04:39:31.120Z'; $this->assertEquals($time, Utils::parseSAML2Time($SAMLTime2)); }