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 (107)

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/widgets/TbButtonGroup.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
 *##  TbButtonGroup class file.
4
 *
5
 * @author Christoffer Niska <[email protected]>
6
 * @copyright Copyright &copy; Christoffer Niska 2011-
7
 * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php) 
8
 * @since 0.9.10
9
 * 
10
 * @author Amr Bedair <[email protected]>
11
 * @since v4.0.0 - upgraded to bootstrap 3.1.1
12
 */
13
14
Yii::import('booster.widgets.TbButton');
15
16
/**
17
 *## Bootstrap button group widget.
18
 *
19
 * @see <http://twitter.github.com/bootstrap/components.html#buttonGroups>
20
 *
21
 * @package booster.widgets.forms.buttons
22
 */
23
class TbButtonGroup extends CWidget {
24
	
25
	// Toggle options.
26
	const TOGGLE_CHECKBOX = 'checkbox';
27
	const TOGGLE_RADIO = 'radio';
28
29
	/**
30
	 * @var string the button callback type.
31
	 * @see BootButton::buttonType
32
	 */
33
	public $buttonType = TbButton::BUTTON_BUTTON;
34
35
	/**
36
	 * @var string the button type.
37
	 * @see BootButton::type
38
	 */
39
	public $context = TbButton::CTX_DEFAULT;
40
	
41
	/**
42
	 * @var boolean indicates whether to use justified button groups
43
	 */
44
	public $justified = false;
45
46
	/**
47
	 * @var string the button size.
48
	 * @see BootButton::size
49
	 */
50
	public $size;
51
52
	/**
53
	 * @var boolean indicates whether to encode the button labels.
54
	 */
55
	public $encodeLabel = true;
56
57
	/**
58
	 * @var array the HTML attributes for the widget container.
59
	 */
60
	public $htmlOptions = array();
61
62
	/**
63
	 * @var array the button configuration.
64
	 */
65
	public $buttons = array();
66
67
	/**
68
	 * @var boolean indicates whether to enable button toggling.
69
	 */
70
	public $toggle;
71
72
	/**
73
	 * @var boolean indicates whether the button group appears vertically stacked. Defaults to 'false'.
74
	 */
75
	public $stacked = false;
76
77
	/**
78
	 * @var boolean indicates whether dropdowns should be dropups instead. Defaults to 'false'.
79
	 */
80
	public $dropup = false;
81
	/**
82
	 * @var boolean indicates whether button is disabled or not. Defaults to 'false'.
83
	 */
84
	public $disabled = false;
85
86
	/**
87
	 *### .init()
88
	 *
89
	 * Initializes the widget.
90
	 */
91
	public function init() {
92
		
93
		$classes = array();
94
		
95
		if ($this->stacked === true) {
96
			$classes[] = 'btn-group-vertical';
97
		} else {
98
			$classes[] = 'btn-group';
99
		}
100
101
		if ($this->dropup === true) {
102
			$classes[] = 'dropup';
103
		}
104
		
105
		if ($this->justified === true) {
106
			$classes[] = 'btn-group-justified';
107
		}
108
109
		if (!empty($classes)) {
110
			$classes = implode(' ', $classes);
111
			if (isset($this->htmlOptions['class'])) {
112
				$this->htmlOptions['class'] .= ' ' . $classes;
113
			} else {
114
				$this->htmlOptions['class'] = $classes;
115
			}
116
		}
117
118
		$validToggles = array(self::TOGGLE_CHECKBOX, self::TOGGLE_RADIO);
119
120
		if (isset($this->toggle) && in_array($this->toggle, $validToggles)) {
121
			$this->htmlOptions['data-toggle'] = 'buttons';
122
		}
123
	}
124
125
	/**
126
	 *### .run()
127
	 *
128
	 * Runs the widget.
129
	 */
130
	public function run() {
131
		
132
		echo CHtml::openTag('div', $this->htmlOptions);
133
134
		foreach ($this->buttons as $button) {
135
			if (isset($button['visible']) && $button['visible'] === false) {
136
				continue;
137
			}
138
			
139
			$validToggles = array(self::TOGGLE_CHECKBOX, self::TOGGLE_RADIO);
140
			if (isset($this->toggle) && in_array($this->toggle, $validToggles)) {
141
				$this->buttonType = $this->toggle;
0 ignored issues
show
Documentation Bug introduced by
The property $buttonType was declared of type string, but $this->toggle is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
142
			}
143
			
144
			$justifiedNotLink = $this->justified && $this->buttonType !== TbButton::BUTTON_LINK;
145
			if($justifiedNotLink)
146
				echo '<div class="btn-group">';
147
			
148
			$this->controller->widget(
149
				'booster.widgets.TbButton',
150
				array(
151
					'buttonType' => isset($button['buttonType']) ? $button['buttonType'] : $this->buttonType,
152
					'context' => isset($button['context']) ? $button['context'] : $this->context,
153
					'size' => $this->size, // all buttons in a group cannot vary in size
154
					'icon' => isset($button['icon']) ? $button['icon'] : null,
155
					'label' => isset($button['label']) ? $button['label'] : null,
156
					'url' => isset($button['url']) ? $button['url'] : null,
157
					'active' => isset($button['active']) ? $button['active'] : false,
158
					'disabled' => isset($button['disabled']) ? $button['disabled'] : false,
159
					'items' => isset($button['items']) ? $button['items'] : array(),
160
					'ajaxOptions' => isset($button['ajaxOptions']) ? $button['ajaxOptions'] : array(),
161
					'htmlOptions' => isset($button['htmlOptions']) ? $button['htmlOptions'] : array(),
162
					'dropdownOptions' => isset($button['dropdownOptions']) ? $button['dropdownOptions'] : array(),
163
					'encodeLabel' => isset($button['encodeLabel']) ? $button['encodeLabel'] : $this->encodeLabel,
164
                    'tooltip' => isset($button['tooltip']) ? $button['tooltip'] : false,
165
                    'tooltipOptions' => isset($button['tooltipOptions']) ? $button['tooltipOptions'] : array(),
166
				)
167
			);
168
			
169
			if($justifiedNotLink)
170
				echo '</div>';
171
		}
172
		echo '</div>';
173
	}
174
}
175