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/TbTimePicker.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
 *## TbTimePicker class file.
4
 */
5
6
/**
7
 *## TbTimePicker widget.
8
 *
9
 * @see http://jdewit.github.com/bootstrap-timepicker/
10
 * @see https://github.com/jdewit/bootstrap-timepicker
11
 *
12
 * @since 1.0.3
13
 * @package booster.widgets.forms.inputs
14
 */
15
16 1
Yii::import('booster.widgets.TbBaseInputWidget');
17
18
class TbTimePicker extends TbBaseInputWidget {
19
	
20
	/**
21
	 * @var TbActiveForm If we're called from the form, here lies the reference to it.
22
	 */
23
	public $form;
24
25
	/**
26
	 * @var array The options for the "bootstrap-timepicker" plugin.
27
	 * @see http://jdewit.github.com/bootstrap-timepicker/
28
	 *
29
	 * Available options:
30
	 * template    string
31
	 *      'dropdown' (default), Show picker in a dropdown
32
	 *      'modal', Show picker in a modal
33
	 *      false, Don't show a widget
34
	 * minuteStep    integer    15    Specify a step for the minute field.
35
	 * showSeconds    boolean    false    Show the seconds field.
36
	 * secondStep    integer    15    Specify a step for the second field.
37
	 * defaultTime    string
38
	 *      'current' (default) Set to the current time.
39
	 *      'value' Set to inputs current value
40
	 *      false    Do not set a default time
41
	 * showMeridian    boolean
42
	 *      true (default)  12hr mode
43
	 *      false24hr mode
44
	 * showInputs    boolean
45
	 *      true (default )Shows the text inputs in the widget.
46
	 *      false Hide the text inputs in the widget
47
	 * disableFocus    boolean    false    Disables the input from focusing. This is useful for touch screen devices that
48
	 *          display a keyboard on input focus.
49
	 * modalBackdrop    boolean    false    Show modal backdrop.
50
	 */
51
	public $options = array();
52
53
	/**
54
	 * @var string[] the JavaScript event handlers.
55
	 * @deprecated 2.0.0 You have the ability to set unique ID and/or class to this element.
56
	 * Define Javascript handlers inside Javascript files, not here.
57
	 * You can generate the Javascript files from PHP, too, there's no need in hand-crafted snippets of Javascript polluting view files.
58
	 */
59
	public $events = array();
60
61
	/**
62
	 * @var array HTML attributes for the wrapper "div" tag.
63
	 */
64
	public $wrapperHtmlOptions = array();
65
66
	/**
67
	 * @var boolean Whether to not append the time icon at end of input.
68
	 * NOTE that the timepicker is opening after click on this icon if it's present!
69
	 */
70
	public $noAppend = false;
71
72
	/**
73
	 * Runs the widget.
74
	 */
75 1
	public function run() {
76
		
77 1
		list($name) = $this->resolveNameID();
78
79
		// TODO: what is this?
80
		// Add a class of no-user-select to widget
81 1
		$this->htmlOptions['class'] = empty($this->htmlOptions['class'])
82 1
			? 'no-user-select'
83 1
			: 'no-user-select ' . $this->htmlOptions['class'];
84
85
		// We are overriding the result of $this->resolveNameID() here, because $id which it emits is not unique through the page.
86 1
		if (empty($this->htmlOptions['id'])) {
87 1
			$this->htmlOptions['id'] = $this->id;
88 1
		}
89
90
		// Adding essential class for timepicker to work.
91 1
		$this->wrapperHtmlOptions = $this->injectClass($this->wrapperHtmlOptions, 'bootstrap-timepicker');
92
93 1
		if (!$this->noAppend)
94 1
			$this->wrapperHtmlOptions = $this->injectClass($this->wrapperHtmlOptions, 'input-group');
95
96
97 1
		echo CHtml::openTag('div', $this->wrapperHtmlOptions);
98 1
		if ($this->hasModel()) {
99 1
			if ($this->form) {
100
				echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
101
			} else {
102 1
				echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
103
			}
104 1
		} else {
105
			echo CHtml::textField($name, $this->value, $this->htmlOptions);
106
		}
107 1
		if (!$this->noAppend)
108 1
			$this->echoAppend();
109 1
		echo CHtml::closeTag('div');
110
111 1
		$this->registerClientScript($this->id);
112 1
	}
113
114
	/**
115
	 * Registers required javascript files
116
	 *
117
	 * @param string $id
118
	 */
119 1
	public function registerClientScript($id) {
120
		
121 1
        Booster::getBooster()->cs->registerPackage('timepicker');
122
123 1
		$options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
124
125 1
		ob_start();
126
127 1
		echo "jQuery('#{$id}').timepicker({$options})";
128 1
		foreach ($this->events as $event => $handler) {
0 ignored issues
show
Deprecated Code introduced by
The property TbTimePicker::$events has been deprecated with message: 2.0.0 You have the ability to set unique ID and/or class to this element.
Define Javascript handlers inside Javascript files, not here.
You can generate the Javascript files from PHP, too, there's no need in hand-crafted snippets of Javascript polluting view files.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
129
			echo ".on('{$event}', " . CJavaScript::encode($handler) . ")";
130 1
		}
131
132 1
		Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, ob_get_clean() . ';');
133 1
	}
134
135
	/**
136
	 * @param array $valueset
137
	 * @param string $className
138
	 *
139
	 * @return array
140
	 */
141 1
	private function injectClass($valueset, $className) {
142
		
143 1
		if (array_key_exists('class', $valueset) and is_string($valueset['class'])) {
144 1
			$valueset['class'] = implode(
145 1
				' ',
146 1
				array_merge(
147 1
					explode(
148 1
						' ',
149 1
						$valueset['class']
150 1
					),
151 1
					array($className)
152 1
				)
153 1
			);
154 1
		} else {
155 1
			$valueset['class'] = $className;
156
		}
157
158 1
		return $valueset;
159
	}
160
161 1
	private function echoAppend() {
162
		
163 1
		echo CHtml::tag('span', array('class' => 'input-group-addon'), CHtml::tag('i', array('class' => 'glyphicon glyphicon-time'), ''));
164 1
	}
165
}
166