Issues (51)

Security Analysis    not enabled

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

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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.

index-site.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
// error_reporting(E_ALL); ini_set('display_errors',1);
4
5
require_once __DIR__ . '/vendor/autoload.php';
6
require_once __DIR__ . '/config.php';
7
include_once __DIR__ . '/config.secrets.php';
8
require_once __DIR__ . '/index-functions.php';
9
10
use CILogon\Service\Util;
11
use CILogon\Service\Content;
12
use CILogon\Service\ShibError;
13
use CILogon\Service\Loggit;
14
15
Util::startPHPSession();
16
17
// Util::startTiming();
18
// Util::$timeit->printTime('MAIN Program START...');
19
20
// Check for a Shibboleth error and handle it
21
$shiberror = new ShibError();
22
23
// Check the csrf cookie against either a hidden <form> element or a
24
// PHP session variable, and get the value of the 'submit' element.
25
// Note: replace CR/LF with space for 'Show/Hide Help' buttons.
26
$retchars = array("\r\n","\n","\r");
27
$submit = str_replace(
28
    $retchars,
29
    " ",
30
    Util::getCsrf()->verifyCookieAndGetSubmit()
31
);
32
Util::unsetSessionVar('submit');
33
Util::unsetSessionVar('storeattributes'); // Used only by /testidp/
34
35
$log = new Loggit();
36
$log->info('submit="' . $submit . '"');
37
38
// Depending on the value of the clicked 'submit' button or the
39
// equivalent PHP session variable, take action or print out HTML.
40
switch ($submit) {
41
    case 'Log On': // Check for OpenID or InCommon usage.
42
    case 'Continue': // For OOI
43
        Content::handleLogOnButtonClicked();
44
        break; // End case 'Log On'
45
46
    case 'Log Off':   // Click the 'Log Off' button
47
        printLogonPage(true);
0 ignored issues
show
The call to printLogonPage() has too many arguments starting with true.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
48
        break; // End case 'Log Off'
49
50
    case 'gotuser': // Return from the getuser script
51
        Content::handleGotUser();
52
        break; // End case 'gotuser'
53
54
    case 'Go Back': // Return to the Main page
55
    case 'Proceed': // Proceed after Error page
56
        Util::verifySessionAndCall('printMainPage');
57
        break; // End case 'Go Back' / 'Proceed'
58
59
    case 'Cancel': // Cancel button on WAYF page - go to CILogon Info Page
60
        header('Location: https://www.cilogon.org');
61
        exit; // No further processing necessary
62
        break;
63
64
    case 'Get New Certificate':
65
        if (Util::verifySessionAndCall('CILogon\\Service\\Content::generateP12')) {
66
            printMainPage();
67
        }
68
        break; // End case 'Get New Certificate'
69
70
    default: // No submit button clicked nor PHP session submit variable set
71
        Content::handleNoSubmitButtonClicked();
72
        break; // End default case
73
} // End switch($submit)
74
75
// Util::$timeit->printTime('MAIN Program END...  ');
76