Skip to content

Commit b1e5c9c

Browse files
committed
Fix mispelings. See #592
1 parent 580371f commit b1e5c9c

23 files changed

+106
-108
lines changed

CHANGELOG

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ v3.5.0
6464
* [#433](https://github.com/onelogin/php-saml/issues/443) Fix Incorrect Destination in LogoutResponse when using responseUrl #443
6565
* Update xmlseclibs to 3.1.1
6666
* Add support for SMARTCARD_PKI and RSA_TOKEN Auth Contexts
67-
* Get lib path dinamically
67+
* Get lib path dynamically
6868
* Check for x509Cert of the IdP when loading settings, even if the security index was not provided
6969
* Support Statements with Attribute elements with the same name enabling the allowRepeatAttributeName setting
7070

@@ -87,7 +87,7 @@ v.3.3.1
8787

8888
v.3.3.0
8989
* Set true as the default value for strict setting
90-
* Relax comparision of false on SignMetadata
90+
* Relax comparison of false on SignMetadata
9191
* Fix CI
9292

9393
v.3.2.1
@@ -203,7 +203,7 @@ v.2.12.0
203203
* [#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.
204204

205205
v.2.11.0
206-
* [#236](https://github.com/onelogin/php-saml/pull/236) Exclude unnecesary files from Composer production downloads
206+
* [#236](https://github.com/onelogin/php-saml/pull/236) Exclude unnecessary files from Composer production downloads
207207
* [#226](https://github.com/onelogin/php-saml/pull/226) Add possibility to handle nameId NameQualifier attribute in SLO Request
208208
* Improve logout documentation on Readme.
209209
* Improve multi-certificate support
@@ -316,7 +316,7 @@ v.2.6.1
316316
-------
317317
* Fix bug on cacheDuration of the Metadata XML generated.
318318
* Make SPNameQualifier optional on the generateNameId method. Avoid the use of SPNameQualifier when generating the NameID on the LogoutRequest builder.
319-
* Allows the authn comparsion attribute to be set via config.
319+
* Allows the authn comparison attribute to be set via config.
320320
* Retrieve Session Timeout after processResponse with getSessionExpiration().
321321
* Improve readme readability.
322322
* 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
334334

335335
v.2.5.0
336336
-------
337-
* Do accesible the ID of the object Logout Request (id attribute).
338-
* Add note about the fact that PHP 5.3 is unssuported.
337+
* Do accessible the ID of the object Logout Request (id attribute).
338+
* Add note about the fact that PHP 5.3 is unsupported.
339339
* Add fingerprint algorithm support.
340340
* Add dependences to composer.
341341

@@ -363,7 +363,7 @@ v.2.2.0
363363
-------
364364
* Fix bug with Encrypted nameID on LogoutRequest.
365365
* Fixed usability bug. SP will inform about AuthFail status after process a Response.
366-
* Added SessionIndex support on LogoutRequest, and know is accesible from the Auth class.
366+
* Added SessionIndex support on LogoutRequest, and know is accessible from the Auth class.
367367
* LogoutRequest and LogoutResponse classes now accept non deflated xml.
368368
* Improved the XML metadata/ Decrypted Assertion output. (prettyprint).
369369
* Fix bug in formatPrivateKey method, the key could be not RSA.

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ a trusted and expected URL.
160160
Read more about Open Redirect [CWE-601](https://cwe.mitre.org/data/definitions/601.html).
161161

162162

163-
### Avoiding Reply attacks ###
163+
### Avoiding Replay attacks ###
164164

165-
A reply attack is basically try to reuse an intercepted valid SAML Message in order to impersonate a SAML action (SSO or SLO).
165+
A replay attack is basically try to reuse an intercepted valid SAML Message in order to impersonate a SAML action (SSO or SLO).
166166

167167
SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
168168
make harder this kind of attacks, but they are still possible.
169169

170-
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
170+
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
171171
to be stored the amount of time of the SAML Message life time, so
172172
we don't need to store all processed message/assertion Ids, but the most recent ones.
173173

@@ -507,15 +507,15 @@ $advancedSettings = array(
507507

508508
// If true, Destination URL should strictly match to the address to
509509
// which the response has been sent.
510-
// Notice that if 'relaxDestinationValidation' is true an empty Destintation
510+
// Notice that if 'relaxDestinationValidation' is true an empty Destination
511511
// will be accepted.
512512
'destinationStrictlyMatches' => false,
513513

514514
// If true, the toolkit will not raised an error when the Statement Element
515515
// contain atribute elements with name duplicated
516516
'allowRepeatAttributeName' => false,
517517

518-
// If true, SAMLResponses with an InResponseTo value will be rejectd if not
518+
// If true, SAMLResponses with an InResponseTo value will be rejected if not
519519
// AuthNRequest ID provided to the validation method.
520520
'rejectUnsolicitedResponsesWithInResponseTo' => false,
521521

@@ -566,7 +566,7 @@ $advancedSettings = array(
566566
),
567567

568568
// Organization information template, the info in en_US lang is
569-
// recomended, add more if required.
569+
// recommended, add more if required.
570570
'organization' => array(
571571
'en-US' => array(
572572
'name' => '',
@@ -909,7 +909,7 @@ $auth->processSLO(false, $requestID);
909909
$errors = $auth->getErrors();
910910

911911
if (empty($errors)) {
912-
echo 'Sucessfully logged out';
912+
echo 'Successfully logged out';
913913
} else {
914914
echo implode(', ', $errors);
915915
}
@@ -1116,7 +1116,7 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
11161116
echo '<p>' . implode(', ', $errors) . '</p>';
11171117
}
11181118
// This check if the response was
1119-
if (!$auth->isAuthenticated()) { // sucessfully validated and the user
1119+
if (!$auth->isAuthenticated()) { // successfully validated and the user
11201120
echo '<p>Not authenticated</p>'; // data retrieved or not
11211121
exit();
11221122
}
@@ -1131,7 +1131,7 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
11311131
$auth->processSLO(); // Process the Logout Request & Logout Response
11321132
$errors = $auth->getErrors(); // Retrieves possible validation errors
11331133
if (empty($errors)) {
1134-
echo '<p>Sucessfully logged out</p>';
1134+
echo '<p>Successfully logged out</p>';
11351135
} else {
11361136
echo '<p>' . htmlentities(implode(', ', $errors)) . '</p>';
11371137
}
@@ -1302,7 +1302,7 @@ SAML 2 Authentication Response class
13021302
SAML 2 Logout Request class
13031303

13041304
* `LogoutRequest` - Constructs the Logout Request object.
1305-
* `getRequest` - Returns the Logout Request defated, base64encoded, unsigned
1305+
* `getRequest` - Returns the Logout Request deflated, base64encoded, unsigned
13061306
* `getID` - Returns the ID of the Logout Request. (If you have the object you can access to the id attribute)
13071307
* `getNameIdData` - Gets the NameID Data of the the Logout Request.
13081308
* `getNameId` - Gets the NameID of the Logout Request.
@@ -1369,7 +1369,7 @@ A class that contains functionality related to the metadata of the SP
13691369

13701370
* `builder` - Generates the metadata of the SP based on the settings.
13711371
* `signmetadata` - Signs the metadata with the key/cert provided
1372-
* `addX509KeyDescriptors` - Adds the x509 descriptors (sign/encriptation) to
1372+
* `addX509KeyDescriptors` - Adds the x509 descriptors (sign/encryption) to
13731373
the metadata
13741374

13751375
##### OneLogin\Saml2\Utils - `Utils.php` #####

advanced_settings_example.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@
8787

8888
// If true, Destination URL should strictly match to the address to
8989
// which the response has been sent.
90-
// Notice that if 'relaxDestinationValidation' is true an empty Destintation
90+
// Notice that if 'relaxDestinationValidation' is true an empty Destination
9191
// will be accepted.
9292
'destinationStrictlyMatches' => false,
9393

9494
// If true, the toolkit will not raised an error when the Statement Element
9595
// contain atribute elements with name duplicated
9696
'allowRepeatAttributeName' => false,
9797

98-
// If true, SAMLResponses with an InResponseTo value will be rejectd if not
98+
// If true, SAMLResponses with an InResponseTo value will be rejected if not
9999
// AuthNRequest ID provided to the validation method.
100100
'rejectUnsolicitedResponsesWithInResponseTo' => false,
101101

@@ -132,7 +132,7 @@
132132
'lowercaseUrlencoding' => false,
133133
),
134134

135-
// Contact information template, it is recommended to suply a technical and support contacts
135+
// Contact information template, it is recommended to supply a technical and support contacts
136136
'contactPerson' => array(
137137
'technical' => array(
138138
'givenName' => '',
@@ -144,7 +144,7 @@
144144
),
145145
),
146146

147-
// Organization information template, the info in en_US lang is recomended, add more if required
147+
// Organization information template, the info in en_US lang is recommended, add more if required
148148
'organization' => array(
149149
'en-US' => array(
150150
'name' => '',

demo1/Readme.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ How it works
4545
process, the index.php view.
4646

4747
2.2 in the second link we access to (attrs.php) have the same process
48-
described at 2.1 with the diference that as RelayState is set the attrs.php
48+
described at 2.1 with the difference that as RelayState is set the attrs.php
4949

5050
3. The SAML Response is processed in the ACS (index.php?acs), if the Response
5151
is not valid, the process stop here and a message is showed. Otherwise we
@@ -68,7 +68,7 @@ How it works
6868
Request to the SP (SLS endpoint, index.php?sls). The SLS endpoint of the SP
6969
process the Logout Request and if is valid, close the session of the user
7070
at the local app and send a Logout Response to the IdP (to the SLS endpoint
71-
of the IdP). The IdP recieve the Logout Response, process it and close the
71+
of the IdP). The IdP receive the Logout Response, process it and close the
7272
session at of the IdP. Notice that the SLO Workflow starts and ends at the IdP.
7373

7474
Notice that all the SAML Requests and Responses are handler at a unique file,

demo1/index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
2+
33
/**
44
* SAML Handler
55
*/
@@ -111,7 +111,7 @@
111111
$auth->processSLO(false, $requestID);
112112
$errors = $auth->getErrors();
113113
if (empty($errors)) {
114-
echo '<p>Sucessfully logged out</p>';
114+
echo '<p>Successfully logged out</p>';
115115
} else {
116116
echo '<p>' . htmlentities(implode(', ', $errors)) . '</p>';
117117
if ($auth->getSettings()->isDebugActive()) {

demo2/Readme.txt

+7-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Onelogin's PHP Toolkit allows you to provide the settings info in 2 ways:
88
toolkit.
99
* Use an array with the setting data.
1010

11-
The first is the case of the demo2 app. The setting.php file and the
11+
The first is the case of the demo2 app. The setting.php file and the
1212
setting_extended.php file should be defined at the base folder of the toolkit.
1313
Review the setting_example.php and the advanced_settings_example.php to
1414
learn how to build them.
@@ -44,17 +44,17 @@ demo1, only changes the targets.
4444
sent to the IdP automatically, (as RelayState is sent the origin url).
4545
We authenticate at the IdP and then a Response is sent to the SP, to the
4646
ACS endpoint, in this case acs.php of the endpoints folder.
47-
47+
4848
2. The SAML Response is processed in the ACS, if the Response is not valid,
4949
the process stop here and a message is showed. Otherwise we are redirected
5050
to the RelayState view (sso.php or index.php). The sso.php detect if the
5151
user is logged and do a redirect to index.php, so we will be in the
5252
index.php at the end.
5353

54-
3. We are logged in the app and the user attributes are showed.
54+
3. We are logged in the app and the user attributes are showed.
5555
At this point, we can test the single log out functionality.
5656

57-
4. The single log out funcionality could be tested by 2 ways.
57+
4. The single log out functionality could be tested by 2 ways.
5858

5959
4.1 SLO Initiated by SP. Click on the "logout" link at the SP, after that
6060
we are redirected to the slo.php view and there a Logout Request is sent
@@ -63,14 +63,12 @@ demo1, only changes the targets.
6363
The SLS endpoint of the SP process the Logout Response and if is
6464
valid, close the user session of the local app. Notice that the SLO
6565
Workflow starts and ends at the SP.
66-
66+
6767
5.2 SLO Initiated by IdP. In this case, the action takes place on the IdP
68-
side, the logout process is initiated at the idP, sends a Logout
68+
side, the logout process is initiated at the idP, sends a Logout
6969
Request to the SP (SLS endpoint sls.php of the endpoint folder).
7070
The SLS endpoint of the SP process the Logout Request and if is valid,
7171
close the session of the user at the local app and sends a Logout Response
72-
to the IdP (to the SLS endpoint of the IdP).The IdP recieves the Logout
72+
to the IdP (to the SLS endpoint of the IdP).The IdP receives the Logout
7373
Response, process it and close the session at of the IdP. Notice that the
7474
SLO Workflow starts and ends at the IdP.
75-
76-

endpoints/sls.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
2+
33
/**
44
* SP Single Logout Service Endpoint
55
*/
@@ -17,7 +17,7 @@
1717
$errors = $auth->getErrors();
1818

1919
if (empty($errors)) {
20-
echo 'Sucessfully logged out';
20+
echo 'Successfully logged out';
2121
} else {
2222
echo htmlentities(implode(', ', $errors));
2323
}

src/Saml2/LogoutRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function __construct(\OneLogin\Saml2\Settings $settings, $request = null,
155155
}
156156

157157
/**
158-
* Returns the Logout Request defated, base64encoded, unsigned
158+
* Returns the Logout Request deflated, base64encoded, unsigned
159159
*
160160
* @param bool|null $deflate Whether or not we should 'gzdeflate' the request body before we return it.
161161
*

src/Saml2/LogoutResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public function isValid($requestId = null, $retrieveParametersFromServer = false
235235
}
236236

237237
/**
238-
* Extracts a node from the DOMDocument (Logout Response Menssage)
238+
* Extracts a node from the DOMDocument (Logout Response Message)
239239
*
240240
* @param string $query Xpath Expression
241241
*

src/Saml2/Response.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function isValid($requestId = null)
245245
);
246246
}
247247

248-
// Validate Asserion timestamps
248+
// Validate Assertion timestamps
249249
$this->validateTimestamps();
250250

251251
// Validate AuthnStatement element exists and is unique
@@ -1007,9 +1007,9 @@ public function validateSignedElements($signedElements)
10071007
$responseTag = '{'.Constants::NS_SAMLP.'}Response';
10081008
$assertionTag = '{'.Constants::NS_SAML.'}Assertion';
10091009

1010-
$ocurrence = array_count_values($signedElements);
1011-
if ((in_array($responseTag, $signedElements) && $ocurrence[$responseTag] > 1)
1012-
|| (in_array($assertionTag, $signedElements) && $ocurrence[$assertionTag] > 1)
1010+
$occurrence = array_count_values($signedElements);
1011+
if ((in_array($responseTag, $signedElements) && $occurrence[$responseTag] > 1)
1012+
|| (in_array($assertionTag, $signedElements) && $occurrence[$assertionTag] > 1)
10131013
|| !in_array($responseTag, $signedElements) && !in_array($assertionTag, $signedElements)
10141014
) {
10151015
return false;
@@ -1092,7 +1092,7 @@ protected function _queryAssertion($assertionXpath)
10921092
}
10931093

10941094
/**
1095-
* Extracts nodes that match the query from the DOMDocument (Response Menssage)
1095+
* Extracts nodes that match the query from the DOMDocument (Response Message)
10961096
*
10971097
* @param string $query Xpath Expression
10981098
*

src/Saml2/Settings.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ public function checkSPSettings(array $settings)
661661
if (!isset($contact['givenName']) || empty($contact['givenName'])
662662
|| !isset($contact['emailAddress']) || empty($contact['emailAddress'])
663663
) {
664-
$errors[] = 'contact_not_enought_data';
664+
$errors[] = 'contact_not_enough_data';
665665
break;
666666
}
667667
}
@@ -673,7 +673,7 @@ public function checkSPSettings(array $settings)
673673
|| !isset($organization['displayname']) || empty($organization['displayname'])
674674
|| !isset($organization['url']) || empty($organization['url'])
675675
) {
676-
$errors[] = 'organization_not_enought_data';
676+
$errors[] = 'organization_not_enough_data';
677677
break;
678678
}
679679
}
@@ -1037,7 +1037,7 @@ public function formatIdPCert()
10371037
}
10381038

10391039
/**
1040-
* Formats the Multple IdP certs.
1040+
* Formats the Multiple IdP certs.
10411041
*/
10421042
public function formatIdPCertMulti()
10431043
{

0 commit comments

Comments
 (0)