Skip to content

Commit

Permalink
Add 'destinationStrictlyMatches' option
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavide committed Oct 1, 2019
1 parent 2aaa5aa commit a965cd7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,12 @@ $advancedSettings = array (
// attribute will not be rejected for this fact.
'relaxDestinationValidation' => false,

// 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
// will be accepted.
'destinationStrictlyMatches' => false,

// Algorithm that the toolkit will use on signing process. Options:
// 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
// 'http://www.w3.org/2000/09/xmldsig#dsa-sha1'
Expand Down
6 changes: 6 additions & 0 deletions advanced_settings_example.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
// attribute will not be rejected for this fact.
'relaxDestinationValidation' => false,

// 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
// will be accepted.
'destinationStrictlyMatches' => false,

// Algorithm that the toolkit will use on signing process. Options:
// 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
// 'http://www.w3.org/2000/09/xmldsig#dsa-sha1'
Expand Down
5 changes: 5 additions & 0 deletions lib/Saml2/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ private function _addDefaultValues()
$this->_security['relaxDestinationValidation'] = false;
}

// Strict Destination match validation
if (!isset($this->_security['destinationStrictlyMatches'])) {
$this->_security['destinationStrictlyMatches'] = false;
}

// encrypt expected
if (!isset($this->_security['wantAssertionsEncrypted'])) {
$this->_security['wantAssertionsEncrypted'] = false;
Expand Down

0 comments on commit a965cd7

Please sign in to comment.