Skip to content

Commit f8edb35

Browse files
committed
Sync commits from 2.X branch
1 parent 1b0ff59 commit f8edb35

6 files changed

Lines changed: 17 additions & 15 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ $advancedSettings = array(
472472
// Set to false and no AuthContext will be sent in the AuthNRequest.
473473
// Set true or don't present this parameter and you will get an AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'.
474474
// Set an array with the possible auth context values: array('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509').
475-
'requestedAuthnContext' => true,
475+
'requestedAuthnContext' => false,
476476

477477
// Indicates if the SP will validate all received xmls.
478478
// (In order to validate the xml, 'strict' and 'wantXMLValidation' must be true).
@@ -1206,7 +1206,7 @@ Main class of OneLogin PHP Toolkit
12061206
* `getNameId` - Returns the nameID
12071207
* `getNameIdFormat` - Gets the NameID Format provided by the SAML response from the IdP.
12081208
* `getNameIdNameQualifier` - Gets the NameID NameQualifier provided from the SAML Response String.
1209-
* `getNameIdNameSPQualifier` - Gets the NameID SP NameQualifier provided from the SAML Response String.
1209+
* `getNameIdSPNameQualifier` - Gets the NameID SP NameQualifier provided from the SAML Response String.
12101210
* `getSessionIndex` - Gets the SessionIndex from the AuthnStatement.
12111211
* `getErrors` - Returns if there were any error
12121212
* `getSSOurl` - Gets the SSO url.
@@ -1244,7 +1244,7 @@ SAML 2 Authentication Response class
12441244
* `getNameId` - Gets the NameID provided by the SAML response from the IdP.
12451245
* `getNameIdFormat` - Gets the NameID Format provided by the SAML response from the IdP.
12461246
* `getNameIdNameQualifier` - Gets the NameID NameQualifier provided from the SAML Response String.
1247-
* `getNameIdNameSPQualifier` - Gets the NameID SP NameQualifier provided from the SAML Response String.
1247+
* `getNameIdSPNameQualifier` - Gets the NameID SP NameQualifier provided from the SAML Response String.
12481248
* `getSessionNotOnOrAfter` - Gets the SessionNotOnOrAfter from the
12491249
AuthnStatement
12501250
* `getSessionIndex` - Gets the SessionIndex from the AuthnStatement.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"require": {
1818
"php": ">=5.4",
19-
"robrichards/xmlseclibs": ">=3.1.0"
19+
"robrichards/xmlseclibs": ">=3.1.1"
2020
},
2121
"require-dev": {
2222
"php-coveralls/php-coveralls": "^1.0.2 || ^2.0",

src/Saml2/Constants.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ class Constants
6464
const AC_PASSWORD_PROTECTED = 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport';
6565
const AC_X509 = 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509';
6666
const AC_SMARTCARD = 'urn:oasis:names:tc:SAML:2.0:ac:classes:Smartcard';
67+
const AC_SMARTCARD_PKI = 'urn:oasis:names:tc:SAML:2.0:ac:classes:SmartcardPKI';
6768
const AC_KERBEROS = 'urn:oasis:names:tc:SAML:2.0:ac:classes:Kerberos';
6869
const AC_WINDOWS = 'urn:federation:authentication:windows';
6970
const AC_TLS = 'urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient';
71+
const AC_RSATOKEN = 'urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken';
7072

7173
// Subject Confirmation
7274
const CM_BEARER = 'urn:oasis:names:tc:SAML:2.0:cm:bearer';

src/Saml2/Utils.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -964,12 +964,12 @@ public static function isSessionStarted()
964964
*/
965965
public static function deleteLocalSession()
966966
{
967-
968967
if (Utils::isSessionStarted()) {
968+
session_unset();
969969
session_destroy();
970+
} else {
971+
$_SESSION = array();
970972
}
971-
972-
unset($_SESSION);
973973
}
974974

975975
/**
@@ -1390,7 +1390,7 @@ public static function addSign($xml, $key, $cert, $signAlgorithm = XMLSecurityKe
13901390
* Validates a signature (Message or Assertion).
13911391
*
13921392
* @param string|\DomNode $xml The element we should validate
1393-
* @param string|null $cert The pubic cert
1393+
* @param string|null $cert The public cert
13941394
* @param string|null $fingerprint The fingerprint of the public cert
13951395
* @param string|null $fingerprintalg The algorithm used to get the fingerprint
13961396
* @param string|null $xpath The xpath of the signed element

src/Saml2/version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"php-saml": {
3-
"version": "3.4.1",
4-
"released": "25/11/2019"
3+
"version": "3.5.0",
4+
"released": "26/11/2020"
55
}
66
}
77

tests/src/OneLogin/Saml2/UtilsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ public function testGetselfhost()
370370
public function testisHTTPS()
371371
{
372372
$this->assertFalse(Utils::isHTTPS());
373-
373+
374374
$_SERVER['HTTPS'] = 'on';
375375
$this->assertTrue(Utils::isHTTPS());
376-
376+
377377
unset($_SERVER['HTTPS']);
378378
$this->assertFalse(Utils::isHTTPS());
379379
$_SERVER['HTTP_HOST'] = 'example.com:443';
@@ -497,7 +497,7 @@ public function testSetBaseURL()
497497
$expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php';
498498
$expectedRoutedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php';
499499
$expectedUrl2 = 'http://anothersp.example.com:81/example2/route.php?x=test';
500-
500+
501501
$this->assertEquals('http', Utils::getSelfProtocol());
502502
$this->assertEquals('anothersp.example.com', Utils::getSelfHost());
503503
$this->assertEquals('81', Utils::getSelfPort());
@@ -933,7 +933,7 @@ public function testDeleteLocalSession()
933933
$this->assertTrue($_SESSION['samltest']);
934934

935935
Utils::deleteLocalSession();
936-
$this->assertFalse(isset($_SESSION));
936+
$this->assertEmpty($_SESSION);
937937
$this->assertFalse(isset($_SESSION['samltest']));
938938

939939
$prev = error_reporting(0);
@@ -942,7 +942,7 @@ public function testDeleteLocalSession()
942942

943943
$_SESSION['samltest'] = true;
944944
Utils::deleteLocalSession();
945-
$this->assertFalse(isset($_SESSION));
945+
$this->assertEmpty($_SESSION);
946946
$this->assertFalse(isset($_SESSION['samltest']));
947947
}
948948
}

0 commit comments

Comments
 (0)