Issues (4069)

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.

modules/Releases/Popup_picker.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
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
/*********************************************************************************
4
 * SugarCRM Community Edition is a customer relationship management program developed by
5
 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
6
7
 * SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
8
 * Copyright (C) 2011 - 2014 Salesagility Ltd.
9
 *
10
 * This program is free software; you can redistribute it and/or modify it under
11
 * the terms of the GNU Affero General Public License version 3 as published by the
12
 * Free Software Foundation with the addition of the following permission added
13
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
14
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
15
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
16
 *
17
 * This program is distributed in the hope that it will be useful, but WITHOUT
18
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
20
 * details.
21
 *
22
 * You should have received a copy of the GNU Affero General Public License along with
23
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
24
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
 * 02110-1301 USA.
26
 *
27
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
28
 * SW2-130, Cupertino, CA 95014, USA. or at email address [email protected].
29
 *
30
 * The interactive user interfaces in modified source and object code versions
31
 * of this program must display Appropriate Legal Notices, as required under
32
 * Section 5 of the GNU Affero General Public License version 3.
33
 *
34
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
35
 * these Appropriate Legal Notices must retain the display of the "Powered by
36
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
37
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
38
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
39
 ********************************************************************************/
40
41
42
43
44
global $theme;
45
46
47
48
49
50
51
52
53
54
class Popup_Picker
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Popup_Picker has been defined more than once; this definition is ignored, only the first definition in include/Popups/Popup_picker.php (L47-356) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
55
{
56
	
57
58
	
59
	/*
60
	 * 
61
	 */
62
	function _get_where_clause()
63
	{
64
		$where = '';
65
		if(isset($_REQUEST['query']))
66
		{
67
			$where_clauses = array();
68
			append_where_clause($where_clauses, "name", "releases.name");
69
		
70
			$where = generate_where_statement($where_clauses);
71
		}
72
		
73
		return $where;
74
	}
75
	
76
	/**
77
	 *
78
	 */
79
	function process_page()
80
	{
81
		global $theme;
82
		global $mod_strings;
83
		global $app_strings;
84
		global $currentModule;
85
		global $sugar_version, $sugar_config;
86
		
87
		$output_html = '';
88
		$where = '';
89
		
90
		$where = $this->_get_where_clause();
91
		
92
		
93
		
94
		$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
95
		$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
96
		$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
97
98
		$button  = "<form action='index.php' method='post' name='form' id='form'>\n";
99
		if(!$hide_clear_button)
100
		{
101
			$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
102
				.$app_strings['LBL_CLEAR_BUTTON_TITLE']."'  value='  "
103
				.$app_strings['LBL_CLEAR_BUTTON_LABEL']."  ' />\n";
104
		}
105
		$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
106
			.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
107
			.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value='  "
108
			.$app_strings['LBL_CANCEL_BUTTON_LABEL']."  ' />\n";
109
		$button .= "</form>\n";
110
111
		$form = new XTemplate('modules/Releases/Popup_picker.html');
112
		$form->assign('MOD', $mod_strings);
113
		$form->assign('APP', $app_strings);
114
		$form->assign('THEME', $theme);
115
		$form->assign('MODULE_NAME', $currentModule);
116
		$form->assign('NAME', $name);
117
		$form->assign('request_data', $request_data);
118
119
		ob_start();
120
		insert_popup_header($theme);
121
		$output_html .= ob_get_contents();
122
		ob_end_clean();
123
		
124
		$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
125
		
126
		$form->parse('main.SearchHeader');
127
		$output_html .= $form->text('main.SearchHeader');
128
		
129
		// Reset the sections that are already in the page so that they do not print again later.
130
		$form->reset('main.SearchHeader');
131
132
		// create the listview
133
		$seed_bean = new Release();
134
		$ListView = new ListView();
135
		$ListView->show_export_button = false;
136
		$ListView->process_for_popups = true;
137
		$ListView->setXTemplate($form);
138
		$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
139
		$ListView->setHeaderText($button);
140
		$ListView->setQuery($where, '', 'name', 'RELEASE');
141
		$ListView->setModStrings($mod_strings);
142
143
		ob_start();
144
		$ListView->processListView($seed_bean, 'main', 'RELEASE');
145
		$output_html .= ob_get_contents();
146
		ob_end_clean();
147
				
148
		$output_html .= insert_popup_footer();
149
		return $output_html;
150
	}
151
} // end of class Popup_Picker
152
?>