GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (222)

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/infrastructure/StringUtils.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
 * @package infrastructure
4
 * @author marius orcsik <[email protected]>
5
 * @date 2010.04.16
6
 */
7
namespace vsc\infrastructure;
8
9
class StringUtils {
10
11
	/**
12
	 * @param string $sString
13
	 * @return string
14
	 */
15 1
	public static function br2nl($sString) {
16 1
		return preg_replace('/<br\/?>/i', "\n", $sString);
17
	}
18
19
	/**
20
	 * @param string $sString
21
	 * @return string
22
	 */
23 1
	public static function stripTags($sString) {
24 1
		return strip_tags($sString);
25
	}
26
27
	/**
28
	 * @param string $sString
29
	 * @return string
30
	 */
31 1
	public static function stripEntities($sString) {
32 1
		return html_entity_decode($sString, ENT_NOQUOTES, 'UTF-8');
33
	}
34
35
	/**
36
	 * @param string $sString
37
	 * @param int $iTimes
38
	 */
39 1
	public static function _echo($sString, $iTimes = 1) {
40 1
		for ($i = 0; $i < $iTimes; $i++)
41 1
			echo $sString;
42 1
	}
43
44
	/**
45
	 * @param string $sString
46
	 * @return string
47
	 */
48 1
	public static function stripScriptTags($sString) {
49 1
		return preg_replace('/<script.*\/script>/mi', '', (string)$sString);
50
	}
51
52
	/**
53
	 * returns an end of line, based on the environment
54
	 * @return string
55
	 */
56 1
	public static function nl() {
57 1
		return vsc::isCli() ? "\n" : '<br/>' . "\n";
58
	}
59
60
	/**
61
	 * Removes all extra spaces from a string
62
	 * @param string $sString
63
	 * @return string
64
	 */
65 1
	public static function allTrim($sString) {
66 1
		return trim(preg_replace('/\s+/m', ' ', $sString));
67
	}
68
69
	/**
70
	 * @param string $sString
71
	 * @return string
72
	 */
73 1
	public static function encodeEntities($sString) {
74 1
		return htmlentities($sString, ENT_QUOTES, 'UTF-8');
75
	}
76
77
	/**
78
	 * @param string $sUri
79
	 * @return string
80
	 */
81 2
	public static function formatUri($sUri) {
82
		$aReplaceWhat = array(
83 2
			'/(&([^(amp;)]))/',
84
			'/ {1,}/',
85
		);
86
		$aReplaceWith = array(
87 2
			'&amp;\2',
88
			'+',
89
		);
90
91 2
		return preg_replace($aReplaceWhat, $aReplaceWith, $sUri);
92
	}
93
94
	/**
95
	 * @param string $sString
96
	 * @param int $iLength
97
	 * @param string $sEtc
98
	 * @return string
99
	 */
100 1
	public static function truncate($sString, $iLength, $sEtc = '...') {
101 1
		if ($iLength == 0)
102
			return '';
103
104 1
		if (strlen($sString) > $iLength) {
105 1
			return substr($sString, 0, $iLength) . $sEtc;
106
		} else {
107 1
			return $sString;
108
		}
109
	}
110
111
	/**
112
	 * @param int $val
113
	 * @param int $base
114
	 * @param string $chars
115
	 * @return string
116
	 */
117 1
	public static function baseEncode($val, $base = 62, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
118
		// can't handle numbers larger than 2^31-1 = 2147483647
119 1
		$str = '';
120
		do {
121 1
			$i = $val % $base;
122 1
			$str = $chars[$i] . $str;
123 1
			$val = ($val - $i) / $base;
124 1
		} while ($val > 0);
125 1
		return $str;
126
	}
127
128
	/**
129
	 * @param string $str
130
	 * @param int $base
131
	 * @param string $chars
132
	 * @return int
0 ignored issues
show
Should the return type not be integer|double?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
133
	 */
134 1
	public static function baseDecode($str, $base = 62, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
135 1
		$str = (string)$str;
136 1
		$len = strlen($str);
137 1
		$val = 0;
138 1
		$arr = array_flip(str_split($chars));
139 1
		for ($i = 0; $i < $len; ++$i) {
140 1
			$val += $arr[$str[$i]] * pow($base, $len - $i - 1);
141
		}
142 1
		return $val;
143
	}
144
}
145