Issues (173)

Security Analysis    13 potential vulnerabilities

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 (3)
Response Splitting can be used to send arbitrary responses.
  File Manipulation (6)
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 (1)
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.
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.

web/admin/js/nro.js (5 issues)

1
/*
2
 * *****************************************************************************
3
 * Contributions to this work were made on behalf of the GÉANT project, a 
4
 * project that has received funding from the European Union’s Framework 
5
 * Programme 7 under Grant Agreements No. 238875 (GN3) and No. 605243 (GN3plus),
6
 * Horizon 2020 research and innovation programme under Grant Agreements No. 
7
 * 691567 (GN4-1) and No. 731122 (GN4-2).
8
 * On behalf of the aforementioned projects, GEANT Association is the sole owner
9
 * of the copyright in all material which was developed by a member of the GÉANT
10
 * project. GÉANT Vereniging (Association) is registered with the Chamber of 
11
 * Commerce in Amsterdam with registration number 40535155 and operates in the 
12
 * UK as a branch of GÉANT Vereniging.
13
 * 
14
 * Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. 
15
 * UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK
16
 *
17
 * License: see the web/copyright.inc.php file in the file structure or
18
 *          <base_url>/copyright.php after deploying the software
19
 */
20
21
/* various jquery scripts for the NRO admin page */
22
23
function row_filter(tbody) {
24
    var linked = tbody.find('[id^="unlinked_ck_"]').is(':checked');
25
    var broken_cert = tbody.find('[id^="brokencert_ck_"]').is(':checked');
26
    var or_warn = tbody.find('[id^="or_ck_"]').is(':checked');
27
    var profile_warn = tbody.find('[id^="profile_ck_"]').is(':checked');
28
    var input = tbody.find('[id^="qsearch_"]').val().toLowerCase();
29
    var tr_visible;
30
    var inp_found;
31
    tbody.children("tr.idp_tr").each(function() {
32
        tr_visible = true;
33
        if (linked && $(this).hasClass('linked')) {
34
            tr_visible = false;
35
        }
36
        if (tr_visible && broken_cert && $(this).hasClass('certok')) {
37
            tr_visible = false;
38
        }
39
        if (tr_visible && or_warn && $(this).hasClass('orok')) {
40
            tr_visible = false;
41
        }        
42
        if (tr_visible && profile_warn && $(this).hasClass('profileok')) {
43
            tr_visible = false;
44
        }         
45
        if (tr_visible && input !== '') {
46
            inp_found = $(this).find("span.inst_name:contains('"+input+"')").length;
47
            if (inp_found == 0) {
0 ignored issues
show
Comparing inp_found to 0 using the == operator is not safe. Consider using === instead.
Loading history...
48
                tr_visible = false;
49
            }
50
        }
51
        if (tr_visible) {
52
            $(this).show();
53
        } else {
54
            $(this).hide();            
55
        }
56
    });
57
}
58
59
function filter_action() {
60
    var this_tbody = $(this).parent().parent().parent();
61
    row_filter(this_tbody);
62
}
63
64
$(document).ready(function() {
65
    // realm diagnostics
66
    $("#realmcheck").on('click', function() {
67
        event.preventDefault();
0 ignored issues
show
The variable event seems to be never declared. If this is a global, consider adding a /** global: event */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
68
        document.location.href = '../diag/diag.php?admin=1&sp=1&realm=';
69
    });
70
71
    // this gets the maximum width of the Organisation column and then sets this to all
72
    // thanks to this the width does not change as we filter out some, possibly wide names
73
    var instTdWidth = 0;
74
    $("td.inst_td").each(function() {
75
        instTdWidth = Math.max(instTdWidth, $(this).width());
76
    });
77
    $("td.inst_td").width(instTdWidth);
78
    
79
    // show/hide download statistics part of the window
80
    $("button.stat-button").on('click', function() {
81
        var stat_downloads = $(this).siblings("table").find(".stat-downloads");
82
        if (stat_downloads.is(":visible")) {
83
            stat_downloads.hide();
84
            $(this).css('position', 'absolute');
85
            $(this).text(show_downloads);                
0 ignored issues
show
The variable show_downloads seems to be never declared. If this is a global, consider adding a /** global: show_downloads */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
86
        } else {
87
            stat_downloads.show();
88
            $(this).css('position', 'static');
89
            $(this).text(hide_downloads);
0 ignored issues
show
The variable hide_downloads seems to be never declared. If this is a global, consider adding a /** global: hide_downloads */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
90
        }
91
    });
92
93
    // handler for the text filter (must take into account possible filtering 
94
    // on linked status
95
    $('[id^="qsearch_"]').keyup(filter_action);
96
97
    // the linked filter checkbox handler
98
    $(":checkbox").on('click', filter_action);
99
    
100
    $("#fed_selection").on('change', function() {
101
        fed = $("#fed_selection option:selected").val();
0 ignored issues
show
The variable fed seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.fed.
Loading history...
102
        if (fed === "XX") {
103
            return;
104
        }
105
        $("#main_content").hide();
106
        $("#loading_gif").show();
107
        document.location.href = "overview_federation.php?fed_id="+fed;
108
    });
109
    
110
    $("img.cat-icon").tooltip();
111
    $("#loading_gif").hide();
112
    $("tbody.fedlist").each(function() {
113
        row_filter($(this));
114
    });
115
});
116
117
118
    
119