Skip to content

chore(deps): bump onelogin/php-saml from 4.4.1 to 4.6.0 - #138

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/onelogin/php-saml-4.6.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/onelogin/php-saml-4.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 27, 2026

Copy link
Copy Markdown
Contributor

Bumps onelogin/php-saml from 4.4.1 to 4.6.0.

Release notes

Sourced from onelogin/php-saml's releases.

OneLogin's SAML PHP Toolkit v4.6.0

  • Fix #674 Escape the values written in the XML of the AuthnRequest, LogoutRequest, LogoutResponse and the SP metadata. A value with a &, like an IdP URL with several query parameters, produced an XML that was not well formed:
    • AuthnRequest: Destination (idp.singleSignOnService.url), ProviderName (displayname of the organization), sp.NameIDFormat, the security.requestedAuthnContext values, security.requestedAuthnContextComparison and the NameID of the Subject (nameIdValueReq)
    • LogoutRequest: Destination (idp.singleLogoutService.url) and SessionIndex
    • LogoutResponse: Destination (idp.singleLogoutService.responseUrl) and InResponseTo
    • Metadata: the organization and contact person data, sp.NameIDFormat, the bindings, and the name, description, requested attributes and attribute values of sp.attributeConsumingService The URL the user is redirected to is not changed. If any of those settings was defined already escaped (&) to get a valid XML, the escaping must be removed from the settings, otherwise the value will be escaped twice
  • Fix #657 The Destination check of Response, LogoutRequest and LogoutResponse is done by the new Utils::checkDestination, so the 3 messages are validated in the same way:
    • security.requireDestination now also applies to LogoutRequest and LogoutResponse: when true, a logout message with no Destination attribute is rejected with ValidationError::MISSING_DESTINATION
    • The Destination of a LogoutRequest and a LogoutResponse is trimmed before it is compared, as the one of the Response already was. A Destination that only has whitespaces is now reported as ValidationError::EMPTY_DESTINATION instead of WRONG_DESTINATION, and security.relaxDestinationValidation accepts it
  • Update certificate and private_key string replacement to include tabs.
  • Add IdPMetadataParser::getLastFetchedXMLFromUrl, which returns the XML that the last call to IdPMetadataParser::parseRemoteXML retrieved from the URL (null if the request failed)
  • Several decryption error handling improvements:
    • An encryption algorithm rejected by the security.allowCBCEncryption or security.allowRSA15KeyTransport settings is reported with the new ValidationError::ENCRYPTION_ALGORITHM_NOT_ALLOWED code. The message of xmlseclibs is kept and the name of the setting that allows the algorithm is appended. Before, the plain Exception of xmlseclibs was thrown, and Auth::processResponse did not catch it
    • An EncryptedAssertion that can not be decrypted no longer makes the Response constructor throw: isValid() returns false and getErrorException() has the cause. This covers a rejected algorithm and every other decryption error of the EncryptedAssertion and of the EncryptedID inside it (Error::PRIVATE_KEY_NOT_FOUND, ValidationError::DECRYPTION_FAILED, KEY_ALGORITHM_ERROR, MISSING_ENCRYPTED_ELEMENT, KEYINFO_NOT_FOUND_IN_ENCRYPTED_DATA...). The assertion of such a Response is not available (encrypted is false), as when the signature of the message is rejected before decrypting it.
    • Utils::decryptElement, Response::getNameIdData/getNameId and LogoutRequest::getNameIdData/getNameId throw that ValidationError instead of the Exception of xmlseclibs. Other errors are thrown as before
    • LogoutRequest::isValid() (and so Auth::processSLO, with the invalid_logout_request error) already reported a rejected algorithm in the EncryptedID; its error now has the new code
    • Add Utils::locateDecryptionKey and Utils::locateDecryptionKeyInfo, which locate the key of an EncryptedData with a decryption context created by Utils::createDecryptionContext and throw the new error for a rejected algorithm (other exceptions are thrown unchanged)
  • Response::isValid() decrypts the EncryptedID of a not encrypted Assertion once the signatures are validated, as LogoutRequest::isValid() does, so a NameID that can not be decrypted makes isValid() return false. Before, isValid() returned true and getNameId() (called by Auth::processResponse) threw the exception

OneLogin's SAML PHP Toolkit v4.5.0

It contains several security improvements. Update to this version if you using 4.X branch.

  • Refactor Signature validation on Signed Responses with Encrypted Assertion
  • Fix #661. Type comparaison error for proxy port #667 HTTP-Redirect signature validation with retrieveParametersFromServer: SAMLRequest, SAMLResponse, RelayState, SigAlg and Signature are matched against the complete field names of the query string, instead of searched as substrings of it. A signed Logout Request/Response with one of those names inside a value or inside the name of another parameter (for example RelayState=Signature) is now validated; it was rejected with "Duplicate parameter in query string" or "Both SAMLRequest and SAMLResponse provided". A message signed with an empty RelayState (RelayState=&SigAlg=...) is now validated; its signature validation failed
    • Security: with retrieveParametersFromServer, a field that PHP parses as one of those parameters (its name has leading spaces, percent-encoded characters, a NUL byte or array brackets) counts as that parameter, so a query string with a second SAMLRequest, SAMLResponse, RelayState, SigAlg or Signature sent that way is rejected with "Duplicate parameter in query string". The message is also rejected ("The SAMLRequest parameter does not match the one of the query string", same for SAMLResponse, RelayState and SigAlg) when the value that PHP parsed is not the value of the query string that the signature covers. Before, the signature of a message could be verified while a different message was processed
    • Compatibility notes for the two previous changes. They only affect the HTTP-Redirect binding when retrieveParametersFromServer is true:
      • Utils::extractOriginalQueryParam only returns the value of the field with exactly that name, and an empty string when there is no such field (it returned an unrelated piece of the query string). A name that is part of another name or value, or that comes after a leading ? at $_SERVER['QUERY_STRING'], is not found anymore
      • Utils::validateBinarySign requires that its $getData holds the values parsed from $_SERVER['QUERY_STRING']. If the application changes the SAMLRequest/SAMLResponse, RelayState or SigAlg values of $_GET (adds slashes, trims them...) or sets $_SERVER['QUERY_STRING'] itself with other content, the message is rejected
      • A query string with an alias of a reserved parameter is rejected even if the alias has no effect (it comes before the signed parameter or repeats its value)
      • Parameters that only have a reserved name inside their name (SigAlgorithm, xSAMLRequest...) are ignored; they were a "Duplicate parameter in query string"
      • The messages returned by getLastErrorReason()/getError() for those requests change accordingly
  • Utils::getSelfProtocol always returns a string. When the protocol (the value of $_SERVER['HTTP_X_FORWARDED_PROTO'] or the one set with setSelfProtocol) is an array, the first value is used; true is https and any other value that is not a string is http
  • When the protocol is a list of values separated by commas (the X-Forwarded-Proto header of a chain of proxies, https,http), the first value is used in Utils::getSelfProtocol, as X-Forwarded-Host already did
  • When X-Forwarded-Host or X-Forwarded-Port are lists of values separated by commas, the first value is used without the spaces around it
  • Utils::setBaseURL ignores a boolean true (it does not clear the base URL that was set)
  • Reject decrypted EncryptedID content that is not an element (a text node made LogoutRequest::getNameIdData fail with a PHP Error)
  • Load XML documents with LIBXML_NONET
  • Add validateSignatureStructure check into Utils and use at ValidateSignature
  • Add validation for Assertion Version
  • #658 IdPMetadataParser::parseRemoteXML accepts extra curl options in a new optional $curlOptions parameter. They are applied last, so they override the ones that the method sets (except CURLOPT_RETURNTRANSFER); options that are not valid raise an Exception. The request now has default timeouts: 10 seconds to connect and 120 seconds in total (it had none), use $curlOptions to change them
Changelog

Sourced from onelogin/php-saml's changelog.

v4.6.0

  • Fix #674 Escape the values written in the XML of the AuthnRequest, LogoutRequest, LogoutResponse and the SP metadata. A value with a &, like an IdP URL with several query parameters, produced an XML that was not well formed:
    • AuthnRequest: Destination (idp.singleSignOnService.url), ProviderName (displayname of the organization), sp.NameIDFormat, the security.requestedAuthnContext values, security.requestedAuthnContextComparison and the NameID of the Subject (nameIdValueReq)
    • LogoutRequest: Destination (idp.singleLogoutService.url) and SessionIndex
    • LogoutResponse: Destination (idp.singleLogoutService.responseUrl) and InResponseTo
    • Metadata: the organization and contact person data, sp.NameIDFormat, the bindings, and the name, description, requested attributes and attribute values of sp.attributeConsumingService The URL the user is redirected to is not changed. If any of those settings was defined already escaped (&) to get a valid XML, the escaping must be removed from the settings, otherwise the value will be escaped twice
  • Fix #657 The Destination check of Response, LogoutRequest and LogoutResponse is done by the new Utils::checkDestination, so the 3 messages are validated in the same way:
    • security.requireDestination now also applies to LogoutRequest and LogoutResponse: when true, a logout message with no Destination attribute is rejected with ValidationError::MISSING_DESTINATION
    • The Destination of a LogoutRequest and a LogoutResponse is trimmed before it is compared, as the one of the Response already was. A Destination that only has whitespaces is now reported as ValidationError::EMPTY_DESTINATION instead of WRONG_DESTINATION, and security.relaxDestinationValidation accepts it
  • Update certificate and private_key string replacement to include tabs.
  • Add IdPMetadataParser::getLastFetchedXMLFromUrl, which returns the XML that the last call to IdPMetadataParser::parseRemoteXML retrieved from the URL (null if the request failed)
  • Several decryption error handling improvements:
    • An encryption algorithm rejected by the security.allowCBCEncryption or security.allowRSA15KeyTransport settings is reported with the new ValidationError::ENCRYPTION_ALGORITHM_NOT_ALLOWED code. The message of xmlseclibs is kept and the name of the setting that allows the algorithm is appended. Before, the plain Exception of xmlseclibs was thrown, and Auth::processResponse did not catch it
    • An EncryptedAssertion that can not be decrypted no longer makes the Response constructor throw: isValid() returns false and getErrorException() has the cause. This covers a rejected algorithm and every other decryption error of the EncryptedAssertion and of the EncryptedID inside it (Error::PRIVATE_KEY_NOT_FOUND, ValidationError::DECRYPTION_FAILED, KEY_ALGORITHM_ERROR, MISSING_ENCRYPTED_ELEMENT, KEYINFO_NOT_FOUND_IN_ENCRYPTED_DATA...). The assertion of such a Response is not available (encrypted is false), as when the signature of the message is rejected before decrypting it.
    • Utils::decryptElement, Response::getNameIdData/getNameId and LogoutRequest::getNameIdData/getNameId throw that ValidationError instead of the Exception of xmlseclibs. Other errors are thrown as before
    • LogoutRequest::isValid() (and so Auth::processSLO, with the invalid_logout_request error) already reported a rejected algorithm in the EncryptedID; its error now has the new code
    • Add Utils::locateDecryptionKey and Utils::locateDecryptionKeyInfo, which locate the key of an EncryptedData with a decryption context created by Utils::createDecryptionContext and throw the new error for a rejected algorithm (other exceptions are thrown unchanged)
  • Response::isValid() decrypts the EncryptedID of a not encrypted Assertion once the signatures are validated, as LogoutRequest::isValid() does, so a NameID that can not be decrypted makes isValid() return false. Before, isValid() returned true and getNameId() (called by Auth::processResponse) threw the exception

v4.5.0

  • Refactor Signature validation on Signed Responses with Encrypted Assertion
  • Fix #661. Type comparaison error for proxy port #667 HTTP-Redirect signature validation with retrieveParametersFromServer: SAMLRequest, SAMLResponse, RelayState, SigAlg and Signature are matched against the complete field names of the query string, instead of searched as substrings of it. A signed Logout Request/Response with one of those names inside a value or inside the name of another parameter (for example RelayState=Signature) is now validated; it was rejected with "Duplicate parameter in query string" or "Both SAMLRequest and SAMLResponse provided". A message signed with an empty RelayState (RelayState=&SigAlg=...) is now validated; its signature validation failed
    • Security: with retrieveParametersFromServer, a field that PHP parses as one of those parameters (its name has leading spaces, percent-encoded characters, a NUL byte or array brackets) counts as that parameter, so a query string with a second SAMLRequest, SAMLResponse, RelayState, SigAlg or Signature sent that way is rejected with "Duplicate parameter in query string". The message is also rejected ("The SAMLRequest parameter does not match the one of the query string", same for SAMLResponse, RelayState and SigAlg) when the value that PHP parsed is not the value of the query string that the signature covers. Before, the signature of a message could be verified while a different message was processed
    • Compatibility notes for the two previous changes. They only affect the HTTP-Redirect binding when retrieveParametersFromServer is true:
      • Utils::extractOriginalQueryParam only returns the value of the field with exactly that name, and an empty string when there is no such field (it returned an unrelated piece of the query string). A name that is part of another name or value, or that comes after a leading ? at $_SERVER['QUERY_STRING'], is not found anymore
      • Utils::validateBinarySign requires that its $getData holds the values parsed from $_SERVER['QUERY_STRING']. If the application changes the SAMLRequest/SAMLResponse, RelayState or SigAlg values of $_GET (adds slashes, trims them...) or sets $_SERVER['QUERY_STRING'] itself with other content, the message is rejected
      • A query string with an alias of a reserved parameter is rejected even if the alias has no effect (it comes before the signed parameter or repeats its value)
      • Parameters that only have a reserved name inside their name (SigAlgorithm, xSAMLRequest...) are ignored; they were a "Duplicate parameter in query string"
      • The messages returned by getLastErrorReason()/getError() for those requests change accordingly
  • Utils::getSelfProtocol always returns a string. When the protocol (the value of $_SERVER['HTTP_X_FORWARDED_PROTO'] or the one set with setSelfProtocol) is an array, the first value is used; true is https and any other value that is not a string is http
  • When the protocol is a list of values separated by commas (the X-Forwarded-Proto header of a chain of proxies, https,http), the first value is used in Utils::getSelfProtocol, as X-Forwarded-Host already did
  • When X-Forwarded-Host or X-Forwarded-Port are lists of values separated by commas, the first value is used without the spaces around it
  • Utils::setBaseURL ignores a boolean true (it does not clear the base URL that was set)
  • Reject decrypted EncryptedID content that is not an element (a text node made LogoutRequest::getNameIdData fail with a PHP Error)
  • Load XML documents with LIBXML_NONET
  • Add validateSignatureStructure check into Utils and use at ValidateSignature
  • Add validation for Assertion Version
  • #658 IdPMetadataParser::parseRemoteXML accepts extra curl options in a new optional $curlOptions parameter. They are applied last, so they override the ones that the method sets (except CURLOPT_RETURNTRANSFER); options that are not valid raise an Exception. The request now has default timeouts: 10 seconds to connect and 120 seconds in total (it had none), use $curlOptions to change them
Commits
  • f4f2230 Update certificate and private_key string replacement to include tabs
  • 8ebc900 Merge pull request #679 from SAML-Toolkits/xml_escape_improvements
  • cdb5cc8 Escape the values written in the XML of the , , and the SP metadata
  • face54c Merge pull request #678 from SAML-Toolkits/check_destination_refactor
  • 0afd15a Refactor and unify Destination check for SAMLResponse, LogoutRequest and Logo...
  • e6b936a Add getLastFetchedXMLFromUrl method to IdPMetadataParser that will return the...
  • 9544009 Merge pull request #677 from SAML-Toolkits/decryption_error_handling
  • fd63bdd Decryption error handling improvements
  • 9bb69a8 Decryption error handling improvements
  • dd404f4 Merge pull request #672 from SAML-Toolkits/several_improvements_4x
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [onelogin/php-saml](https://github.com/SAML-Toolkits/php-saml) from 4.4.1 to 4.6.0.
- [Release notes](https://github.com/SAML-Toolkits/php-saml/releases)
- [Changelog](https://github.com/SAML-Toolkits/php-saml/blob/4.6.0/CHANGELOG)
- [Commits](SAML-Toolkits/php-saml@4.4.1...4.6.0)

---
updated-dependencies:
- dependency-name: onelogin/php-saml
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants