Issues (538)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/XML/samlp/LogoutResponse.php (6 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\XML\samlp;
6
7
use DOMElement;
8
use SimpleSAML\SAML2\Assert\Assert;
9
use SimpleSAML\SAML2\Exception\Protocol\RequestVersionTooHighException;
0 ignored issues
show
The type SimpleSAML\SAML2\Excepti...VersionTooHighException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use SimpleSAML\SAML2\Exception\Protocol\RequestVersionTooLowException;
0 ignored issues
show
The type SimpleSAML\SAML2\Excepti...tVersionTooLowException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use SimpleSAML\SAML2\Type\SAMLAnyURIValue;
12
use SimpleSAML\SAML2\Type\SAMLDateTimeValue;
0 ignored issues
show
The type SimpleSAML\SAML2\Type\SAMLDateTimeValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use SimpleSAML\SAML2\Type\SAMLStringValue;
14
use SimpleSAML\SAML2\XML\saml\Issuer;
15
use SimpleSAML\XML\SchemaValidatableElementInterface;
16
use SimpleSAML\XML\SchemaValidatableElementTrait;
17
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
18
use SimpleSAML\XMLSchema\Type\IDValue;
0 ignored issues
show
The type SimpleSAML\XMLSchema\Type\IDValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
use SimpleSAML\XMLSchema\Type\NCNameValue;
0 ignored issues
show
The type SimpleSAML\XMLSchema\Type\NCNameValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
use SimpleSAML\XMLSecurity\XML\ds\Signature;
21
22
use function array_pop;
23
use function strval;
24
25
/**
26
 * Class for SAML 2 LogoutResponse messages.
27
 *
28
 * @package simplesamlphp/saml2
29
 */
30
final class LogoutResponse extends AbstractStatusResponse implements SchemaValidatableElementInterface
31
{
32
    use SchemaValidatableElementTrait;
33
34
35
    /**
36
     * Constructor for SAML 2 LogoutResponse.
37
     *
38
     * @param \SimpleSAML\XMLSchema\Type\IDValue $id
39
     * @param \SimpleSAML\SAML2\XML\samlp\Status $status
40
     * @param \SimpleSAML\SAML2\Type\SAMLDateTimeValue $issueInstant
41
     * @param \SimpleSAML\SAML2\XML\saml\Issuer|null $issuer
42
     * @param \SimpleSAML\XMLSchema\Type\NCNameValue|null $inResponseTo
43
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue|null $destination
44
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue|null $consent
45
     * @param \SimpleSAML\SAML2\XML\samlp\Extensions|null $extensions
46
     *
47
     * @throws \Exception
48
     */
49
    public function __construct(
50
        IDValue $id,
51
        Status $status,
52
        SAMLDateTimeValue $issueInstant,
53
        ?Issuer $issuer = null,
54
        ?NCNameValue $inResponseTo = null,
55
        ?SAMLAnyURIValue $destination = null,
56
        ?SAMLAnyURIValue $consent = null,
57
        ?Extensions $extensions = null,
0 ignored issues
show
The type SimpleSAML\SAML2\XML\samlp\Extensions was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
58
    ) {
59
        parent::__construct(
60
            $id,
61
            $status,
62
            $issueInstant,
63
            $issuer,
64
            $inResponseTo,
65
            $destination,
66
            $consent,
67
            $extensions,
68
        );
69
    }
70
71
72
    /**
73
     * Convert XML into an LogoutResponse
74
     *
75
     * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
76
     *   if the qualified name of the supplied element is wrong
77
     * @throws \SimpleSAML\XMLSchema\Exception\MissingAttributeException
78
     *   if the supplied element is missing one of the mandatory attributes
79
     */
80
    public static function fromXML(DOMElement $xml): static
81
    {
82
        Assert::same($xml->localName, 'LogoutResponse', InvalidDOMElementException::class);
83
        Assert::same($xml->namespaceURI, LogoutResponse::NS, InvalidDOMElementException::class);
84
85
        $version = self::getAttribute($xml, 'Version', SAMLStringValue::class);
86
        Assert::true(version_compare('2.0', strval($version), '<='), RequestVersionTooLowException::class);
87
        Assert::true(version_compare('2.0', strval($version), '>='), RequestVersionTooHighException::class);
88
89
        $issuer = Issuer::getChildrenOfClass($xml);
90
        Assert::countBetween($issuer, 0, 1);
91
92
        $status = Status::getChildrenOfClass($xml);
93
        Assert::count($status, 1);
94
95
        $extensions = Extensions::getChildrenOfClass($xml);
96
        Assert::maxCount($extensions, 1, 'Only one saml:Extensions element is allowed.');
97
98
        $signature = Signature::getChildrenOfClass($xml);
99
        Assert::maxCount($signature, 1, 'Only one ds:Signature element is allowed.');
100
101
        $response = new static(
102
            self::getAttribute($xml, 'ID', IDValue::class),
103
            array_pop($status),
104
            self::getAttribute($xml, 'IssueInstant', SAMLDateTimeValue::class),
105
            array_pop($issuer),
106
            self::getOptionalAttribute($xml, 'InResponseTo', NCNameValue::class, null),
107
            self::getOptionalAttribute($xml, 'Destination', SAMLAnyURIValue::class, null),
108
            self::getOptionalAttribute($xml, 'Consent', SAMLAnyURIValue::class, null),
109
            empty($extensions) ? null : array_pop($extensions),
110
        );
111
112
        if (!empty($signature)) {
113
            $response->setSignature($signature[0]);
114
            $response->messageContainedSignatureUponConstruction = true;
115
            $response->setXML($xml);
116
        }
117
118
        return $response;
119
    }
120
}
121