Issues (162)

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.

Tests/testrunner.js (2 issues)

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
var system = require('system');
2
3
/**
4
 * Wait until the test condition is true or a timeout occurs. Useful for waiting
5
 * on a server response or for a ui change (fadeIn, etc.) to occur.
6
 *
7
 * @param testFx javascript condition that evaluates to a boolean,
8
 * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
9
 * as a callback function.
10
 * @param onReady what to do when testFx condition is fulfilled,
11
 * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
12
 * as a callback function.
13
 * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used.
14
 */
15
function waitFor(testFx, onReady, timeOutMillis) {
16
    var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 30001, //< Default Max Timeout is 3s
17
        start = new Date().getTime(),
18
        condition = false,
19
        interval = setInterval(function() {
20
            if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) {
21
                // If not time-out yet and condition not yet fulfilled
22
                condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code
0 ignored issues
show
Security Performance introduced by
Calls to eval are slow and potentially dangerous, especially on untrusted code. Please consider whether there is another way to achieve your goal.
Loading history...
23
            } else {
24
                if(!condition) {
25
                    // If condition still not fulfilled (timeout but condition is 'false')
26
                    console.log("'waitFor()' timeout");
27
                    phantom.exit(1);
28
                } else {
29
                    // Condition fulfilled (timeout and/or condition is 'true')
30
                    console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms.");
31
                    typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled
0 ignored issues
show
Security Performance introduced by
Calls to eval are slow and potentially dangerous, especially on untrusted code. Please consider whether there is another way to achieve your goal.
Loading history...
32
                    clearInterval(interval); //< Stop this interval
33
                }
34
            }
35
        }, 100); //< repeat check every 100ms
36
};
37
38
39
if (system.args.length !== 2) {
40
    console.log('Usage: run-jasmine.js URL');
41
    phantom.exit(1);
42
}
43
44
var page = require('webpage').create();
45
46
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
47
page.onConsoleMessage = function(msg) {
48
    console.log(msg);
49
};
50
51
page.open(system.args[1], function(status){
52
    if (status !== "success") {
53
        console.log("Unable to access network");
54
        phantom.exit();
55
    } else {
56
        waitFor(function(){
57
            return page.evaluate(function(){
58
                return document.body.querySelector('.symbolSummary .pending') === null
59
            });
60
        }, function(){
61
            var exitCode = page.evaluate(function(){
62
                console.log('');
63
                console.log(document.body.querySelector('.description').innerText);
64
                var list = document.body.querySelectorAll('.results > #details > .specDetail.failed');
65
                if (list && list.length > 0) {
66
                  console.log('');
67
                  console.log(list.length + ' test(s) FAILED:');
68
                  for (i = 0; i < list.length; ++i) {
69
                      var el = list[i],
70
                          desc = el.querySelector('.description'),
71
                          msg = el.querySelector('.resultMessage.fail');
72
                      console.log('');
73
                      console.log(desc.innerText);
74
                      console.log(msg.innerText);
75
                      console.log('');
76
                  }
77
                  return 1;
78
                } else {
79
                  console.log(document.body.querySelector('.alert > .passingAlert.bar').innerText);
80
                  return 0;
81
                }
82
            });
83
            phantom.exit(exitCode);
84
        });
85
    }
86
});
87