diff --git a/CHANGELOG b/CHANGELOG index dc1389b3..8ab526fa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -30,7 +30,7 @@ v.2.19.0 * [#433](https://github.com/onelogin/php-saml/issues/443) Fix Incorrect Destination in LogoutResponse when using responseUrl #443 * Add support for SMARTCARD_PKI and RSA_TOKEN Auth Contexts * Support Statements with Attribute elements with the same name enabling the allowRepeatAttributeName setting -* 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 v.2.18.1 @@ -53,7 +53,7 @@ v.2.17.1 v.2.17.0 * Set true as the default value for strict setting * Support 'x509cert' and 'privateKey' on signMetadata security settings -* Relax comparision of false on SignMetadata +* Relax comparison of false on SignMetadata * Fix CI v.2.16.0 @@ -92,7 +92,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 @@ -205,7 +205,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. @@ -223,8 +223,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. @@ -252,7 +252,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 027d9330..73d48d53 100644 --- a/README.md +++ b/README.md @@ -556,11 +556,11 @@ $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, - // 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, @@ -600,7 +600,7 @@ $advancedSettings = array ( ), // Organization information template, the info in en_US lang is - // recomended, add more if required. + // v, add more if required. 'organization' => array ( 'en-US' => array( 'name' => '', @@ -947,7 +947,7 @@ $auth->processSLO(false, $requestID); $errors = $auth->getErrors(); if (empty($errors)) { - echo 'Sucessfully logged out'; + echo 'Successfully logged out'; } else { echo implode(', ', $errors); } @@ -1154,7 +1154,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(); } @@ -1169,7 +1169,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 '

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

'; } @@ -1419,7 +1419,7 @@ SAML 2 Authentication Response class SAML 2 Logout Request class * `OneLogin_Saml2_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. @@ -1486,7 +1486,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 95b2f87e..ce974e19 100644 --- a/advanced_settings_example.php +++ b/advanced_settings_example.php @@ -91,11 +91,11 @@ // 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, - // 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, @@ -121,7 +121,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' => '', @@ -133,7 +133,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 d8810676..392ae176 100644 --- a/demo1/Readme.txt +++ b/demo1/Readme.txt @@ -43,7 +43,7 @@ How it works notice that a RelayState parameter is set to the url that initiated the 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 + 2.2 in the second link we access to (attrs.php) have the same process 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 @@ -64,7 +64,7 @@ How it works side, the logout process is initiated at the idP, sends a Logout 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 8e1babd9..d1d8bbcb 100644 --- a/demo1/index.php +++ b/demo1/index.php @@ -105,7 +105,7 @@ $auth->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 7a34800f..1be1ab01 100644 --- a/demo2/Readme.txt +++ b/demo2/Readme.txt @@ -54,7 +54,7 @@ demo1, only changes the targets. 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 @@ -69,7 +69,7 @@ demo1, only changes the targets. 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/docs/Saml2/files/Settings.php.txt b/docs/Saml2/files/Settings.php.txt index ba715b5e..66e5e83b 100644 --- a/docs/Saml2/files/Settings.php.txt +++ b/docs/Saml2/files/Settings.php.txt @@ -684,7 +684,7 @@ class OneLogin_Saml2_Settings || !isset($organization['displayname']) || empty($organization['displayname']) || !isset($organization['url']) || empty($organization['url']) ) { - $errors[] = 'organization_not_enought_data'; + $errors[] = 'organization_not_enough_data'; break; } } diff --git a/endpoints/sls.php b/endpoints/sls.php index 7dd508ba..909376e3 100644 --- a/endpoints/sls.php +++ b/endpoints/sls.php @@ -14,7 +14,7 @@ $errors = $auth->getErrors(); if (empty($errors)) { - echo 'Sucessfully logged out'; + echo 'Successfully logged out'; } else { echo htmlentities(implode(', ', $errors)); } diff --git a/lib/Saml2/LogoutRequest.php b/lib/Saml2/LogoutRequest.php index 882a8daf..2a4a6a1e 100644 --- a/lib/Saml2/LogoutRequest.php +++ b/lib/Saml2/LogoutRequest.php @@ -136,7 +136,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/lib/Saml2/LogoutResponse.php b/lib/Saml2/LogoutResponse.php index 21c1adad..763ee0ca 100644 --- a/lib/Saml2/LogoutResponse.php +++ b/lib/Saml2/LogoutResponse.php @@ -213,7 +213,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 Expresion * diff --git a/lib/Saml2/Response.php b/lib/Saml2/Response.php index 3fb1dc52..a74a0e22 100644 --- a/lib/Saml2/Response.php +++ b/lib/Saml2/Response.php @@ -218,7 +218,7 @@ public function isValid($requestId = null) ); } - // Validate Asserion timestamps + // Validate Assertion timestamps $this->validateTimestamps(); // Validate AuthnStatement element exists and is unique @@ -983,9 +983,9 @@ public function validateSignedElements($signedElements) $responseTag = '{'.OneLogin_Saml2_Constants::NS_SAMLP.'}Response'; $assertionTag = '{'.OneLogin_Saml2_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; @@ -1068,7 +1068,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 Expresion * diff --git a/lib/Saml2/Settings.php b/lib/Saml2/Settings.php index 358bf5ea..660f56cc 100644 --- a/lib/Saml2/Settings.php +++ b/lib/Saml2/Settings.php @@ -672,7 +672,7 @@ public function checkSPSettings($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; } } @@ -684,7 +684,7 @@ public function checkSPSettings($settings) || !isset($organization['displayname']) || empty($organization['displayname']) || !isset($organization['url']) || empty($organization['url']) ) { - $errors[] = 'organization_not_enought_data'; + $errors[] = 'organization_not_enough_data'; break; } } @@ -1040,7 +1040,7 @@ public function formatIdPCert() } /** - * Formats the Multple IdP certs. + * Formats the Multiple IdP certs. */ public function formatIdPCertMulti() { diff --git a/lib/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd b/lib/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd index 8513959a..12ef3d42 100644 --- a/lib/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd +++ b/lib/Saml2/schemas/saml-schema-authn-context-types-2.0.xsd @@ -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 @@ -429,7 +429,7 @@ 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. diff --git a/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php b/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php index d926ee38..675d86f3 100644 --- a/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php +++ b/tests/ZendModStandard/Sniffs/Debug/CodeAnalyzerSniff.php @@ -75,11 +75,11 @@ public function process(PHP_CodeSniffer_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); - // $exitCode is the last line of $output if no error occures, on error it + // $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..90d36ff0 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..ef436f68 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..0e24b2cc 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..c28814c3 100644 --- a/tests/data/metadata/idp/shib_metadata.xml +++ b/tests/data/metadata/idp/shib_metadata.xml @@ -1,7 +1,7 @@