This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
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 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | class Popup_Picker |
||
0 ignored issues
–
show
|
|||
50 | { |
||
51 | |||
52 | |||
53 | /* |
||
54 | * |
||
55 | */ |
||
56 | function __construct() |
||
57 | { |
||
58 | |||
59 | } |
||
60 | |||
61 | /** |
||
62 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
||
63 | */ |
||
64 | function Popup_Picker(){ |
||
65 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
||
66 | if(isset($GLOBALS['log'])) { |
||
67 | $GLOBALS['log']->deprecated($deprecatedMessage); |
||
68 | } |
||
69 | else { |
||
70 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
||
71 | } |
||
72 | self::__construct(); |
||
73 | } |
||
74 | |||
75 | |||
76 | /* |
||
77 | * |
||
78 | */ |
||
79 | function _get_where_clause() |
||
80 | { |
||
81 | $where = ''; |
||
82 | if(isset($_REQUEST['query'])) |
||
83 | { |
||
84 | $where_clauses = array(); |
||
85 | append_where_clause($where_clauses, "name", "acl_roles.name"); |
||
86 | $where = generate_where_statement($where_clauses); |
||
87 | } |
||
88 | |||
89 | return $where; |
||
90 | } |
||
91 | |||
92 | /** |
||
93 | * |
||
94 | */ |
||
95 | function process_page() |
||
96 | { |
||
97 | global $mod_strings; |
||
98 | global $app_strings; |
||
99 | global $currentModule; |
||
100 | global $sugar_version, $sugar_config; |
||
101 | |||
102 | $output_html = ''; |
||
103 | $where = ''; |
||
104 | |||
105 | $where = $this->_get_where_clause(); |
||
106 | |||
107 | $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name']; |
||
108 | $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data']; |
||
109 | $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true; |
||
110 | |||
111 | $button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
||
112 | if(!$hide_clear_button) |
||
113 | { |
||
114 | $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
||
115 | .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
||
116 | .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
||
117 | } |
||
118 | $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" |
||
119 | .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' value=' " |
||
120 | .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
||
121 | $button .= "</form>\n"; |
||
122 | |||
123 | $form = new XTemplate('modules/ACLRoles/Popup_picker.html'); |
||
124 | $form->assign('MOD', $mod_strings); |
||
125 | $form->assign('APP', $app_strings); |
||
126 | $form->assign('MODULE_NAME', $currentModule); |
||
127 | $form->assign('NAME', $name); |
||
128 | $form->assign('request_data', $request_data); |
||
129 | |||
130 | ob_start(); |
||
131 | insert_popup_header(); |
||
132 | $output_html .= ob_get_contents(); |
||
133 | ob_end_clean(); |
||
134 | |||
135 | $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false); |
||
136 | |||
137 | $form->parse('main.SearchHeader'); |
||
138 | $output_html .= $form->text('main.SearchHeader'); |
||
139 | |||
140 | // Reset the sections that are already in the page so that they do not print again later. |
||
141 | $form->reset('main.SearchHeader'); |
||
142 | |||
143 | // create the listview |
||
144 | $seed_bean = new ACLRole(); |
||
145 | $ListView = new ListView(); |
||
146 | $ListView->show_export_button = false; |
||
147 | $ListView->process_for_popups = true; |
||
148 | $ListView->setXTemplate($form); |
||
149 | $ListView->setHeaderTitle($mod_strings['LBL_ROLE']); |
||
150 | $ListView->setHeaderText($button); |
||
151 | $ListView->setQuery($where, '', 'name', 'ROLE'); |
||
152 | $ListView->setModStrings($mod_strings); |
||
153 | |||
154 | ob_start(); |
||
155 | $ListView->processListView($seed_bean, 'main', 'ROLE'); |
||
156 | $output_html .= ob_get_contents(); |
||
157 | ob_end_clean(); |
||
158 | |||
159 | $output_html .= insert_popup_footer(); |
||
160 | return $output_html; |
||
161 | } |
||
162 | } // end of class Popup_Picker |
||
163 | ?> |
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.