Issues (1098)

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.

src/scripts/get.php (1 issue)

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
//------------------------------------------------------------------------------
4
//
5
//  eTraxis - Records tracking web-based system
6
//  Copyright (C) 2010-2011  Artem Rodygin
7
//
8
//  This program is free software: you can redistribute it and/or modify
9
//  it under the terms of the GNU General Public License as published by
10
//  the Free Software Foundation, either version 3 of the License, or
11
//  (at your option) any later version.
12
//
13
//  This program is distributed in the hope that it will be useful,
14
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
//  GNU General Public License for more details.
17
//
18
//  You should have received a copy of the GNU General Public License
19
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//------------------------------------------------------------------------------
22
23
/**
24
 * @package eTraxis
25
 * @ignore
26
 */
27
28
/**#@+
29
 * Dependency.
30
 */
31
require_once('../config.php');
32
require_once('../engine/xml.php');
33
/**#@-*/
34
35
// Check the requested name for validness.
36
37
$name = isset($_REQUEST['name'])
38
      ? $_REQUEST['name']
39
      : NULL;
40
41
mb_regex_encoding('UTF-8');
42
43
if (!mb_eregi('^([_0-9a-z\.\-])+$',         $name) &&
44
    !mb_eregi('^plugins/([_0-9a-z\.\-])+$', $name) &&
45
    !mb_eregi('^jqplot/([_0-9a-z\.\-])+$',  $name))
46
{
47
    exit;
48
}
49
50
// Check the script file for existance.
51
52
$file = LOCALROOT . '/scripts/' . $name;
53
54
if (!is_file($file))
55
{
56
    exit;
57
}
58
59
// Output requested script file.
60
61
$output = file_get_contents($file);
62
63 View Code Duplication
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
64
{
65
    // Check whether a client's browser support gzip-compression.
66
    if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE)
67
    {
68
        $output = gzencode($output);
69
        header('Content-Encoding: gzip');
70
    }
71
    // Check whether a client's browser support deflate-compression.
72
    elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== FALSE)
73
    {
74
        $output = gzdeflate($output);
75
        header('Content-Encoding: deflate');
76
    }
77
}
78
79
header('Content-Type: text/javascript');
80
header('Content-Length: ' . strlen($output));
81
header(sprintf('Content-Range: bytes 0-%d/%d', strlen($output) - 1, strlen($output)));
82
header('Pragma: cache');
83
header('Cache-Control: public');
84
header('Last-Modified: ' . date(DATE_RFC2822, filectime($file)));
85
header('Expires: ' . date(DATE_RFC2822, time() + 86400));
86
header('ETag: "' . md5(sprintf('%s/%s', VERSION, $file)) . '"');
87
88
echo($output);
89
90
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
91