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 | * Description: |
||
44 | ********************************************************************************/ |
||
45 | // cn: bug 6078: zlib breaks test-settings |
||
46 | $iniError = ''; |
||
47 | if(ini_get('zlib.output_compression') == 1) { // ini_get() returns 1/0, not value |
||
48 | if(!ini_set('zlib.output_compression', 'Off')) { // returns False on failure |
||
49 | $iniError = $mod_strings['ERR_INI_ZLIB']; |
||
50 | } |
||
51 | } |
||
52 | |||
53 | // hack to allow "&", "%" and "+" through a $_GET var |
||
54 | // set by ie_test_open_popup() javascript call |
||
55 | foreach($_REQUEST as $k => $v) { |
||
56 | $v = str_replace('::amp::', '&', $v); |
||
57 | $v = str_replace('::plus::', '+', $v); |
||
58 | $v = str_replace('::percent::', '%', $v); |
||
59 | $_REQUEST[$k] = $v; |
||
60 | } |
||
61 | |||
62 | if(ob_get_level() > 0) { |
||
63 | ob_end_clean(); |
||
64 | } |
||
65 | |||
66 | if(ob_get_level() < 1) { |
||
67 | ob_start(); |
||
68 | } |
||
69 | |||
70 | |||
71 | require_once('modules/InboundEmail/language/'.$current_language.'.lang.php'); |
||
72 | global $theme; |
||
73 | |||
74 | $title = ''; |
||
75 | $msg = ''; |
||
76 | $tls = ''; |
||
77 | $cert = ''; |
||
78 | $ssl = ''; |
||
79 | $notls = ''; |
||
80 | $novalidate_cert = ''; |
||
81 | $useSsl = false; |
||
82 | |||
83 | /////////////////////////////////////////////////////////////////////////////// |
||
84 | //// TITLES |
||
85 | |||
86 | $popupBoolean = false; |
||
87 | if (isset($_REQUEST['target']) && $_REQUEST['target'] == 'Popup') { |
||
88 | $popupBoolean = true; |
||
89 | } |
||
90 | if (isset($_REQUEST['target1']) && $_REQUEST['target1'] == 'Popup') { |
||
91 | $popupBoolean = true; |
||
92 | } |
||
93 | |||
94 | if($popupBoolean) { |
||
95 | $title = ''; |
||
96 | $msg = $mod_strings['LBL_TEST_WAIT_MESSAGE']; |
||
97 | } |
||
98 | |||
99 | if(isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) { |
||
100 | $msg .= $mod_strings['LBL_FIND_SSL_WARN']; |
||
101 | $useSsl = true; |
||
102 | } |
||
103 | |||
104 | |||
105 | $ie = new InboundEmail(); |
||
106 | if(!empty($_REQUEST['ie_id'])) { |
||
107 | $ie->retrieve($_REQUEST['ie_id']); |
||
108 | } |
||
109 | $ie->email_user = $_REQUEST['email_user']; |
||
110 | $ie->server_url = $_REQUEST['server_url']; |
||
111 | $ie->port = $_REQUEST['port']; |
||
112 | $ie->protocol = $_REQUEST['protocol']; |
||
113 | //Bug 23083.Special characters in email password results in IMAP authentication failure |
||
114 | if(!empty($_REQUEST['email_password'])) { |
||
115 | $ie->email_password = html_entity_decode($_REQUEST['email_password'], ENT_QUOTES); |
||
116 | $ie->email_password = str_rot13($ie->email_password); |
||
117 | } |
||
118 | $ie->mailbox = 'INBOX'; |
||
119 | |||
120 | if($popupBoolean) { |
||
121 | $msg = $ie->connectMailserver(true); |
||
122 | } |
||
123 | |||
124 | //// END TITLES |
||
125 | /////////////////////////////////////////////////////////////////////////////// |
||
126 | |||
127 | /////////////////////////////////////////////////////////////////////////////// |
||
128 | //// COMMON CODE |
||
129 | echo /*' |
||
130 | <HTML> |
||
131 | <HEAD> |
||
132 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
||
133 | <title>SugarCRM - Commercial Open Source CRM</title> |
||
134 | '.SugarThemeRegistry::current()->getCSS().' |
||
135 | <script type="text/javascript"> |
||
136 | function setMailbox(box) { |
||
137 | var mb = opener.document.getElementById("mailbox"); |
||
138 | mb.value = box; |
||
139 | } |
||
140 | </script> |
||
141 | |||
142 | </HEAD> |
||
143 | <body style="margin: 10px">*/' |
||
144 | <p> |
||
145 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
||
146 | <tr> |
||
147 | <td> |
||
148 | '.SugarThemeRegistry::current()->getImage('h3Arrow', 'border="0"', 11, 11, ".gif", $mod_strings['LBL_POPUP_TITLE']).' |
||
149 | </td> |
||
150 | <td> |
||
151 | <h3> '.$title.'</h3> |
||
152 | </td> |
||
153 | </tr> |
||
154 | <tr> |
||
155 | <td></td> |
||
156 | <td valign="top"> |
||
157 | <div id="testSettingsMsg"> |
||
158 | '.$msg.' |
||
159 | </div> |
||
160 | <div id="testSettingsTic"></div> |
||
161 | <div id="testSettingsErr">'.$iniError.'</div> |
||
162 | </td> |
||
163 | </tr>'; |
||
164 | |||
165 | if($popupBoolean) { |
||
0 ignored issues
–
show
|
|||
166 | /* echo ' <tr><td> </td><td> </td></tr><tr> |
||
167 | <td></td> |
||
168 | <td> |
||
169 | <form name="form"> |
||
170 | <input name="close" type="button" title="'.$mod_strings['LBL_CLOSE_POPUP'].'" value=" '.$mod_strings['LBL_CLOSE_POPUP'].' " onClick="window.close()"> |
||
171 | </form> |
||
172 | </td> |
||
173 | </tr>';*/ |
||
174 | } |
||
175 | |||
176 | echo ' </table>'; |
||
177 | |||
178 | |||
179 | //// END COMMON CODE |
||
180 | /////////////////////////////////////////////////////////////////////////////// |
||
181 | |||
182 | ?> |
This check looks for the bodies of
if
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
if
bodies can be removed. If you have an empty if but statements in theelse
branch, consider inverting the condition.could be turned into
This is much more concise to read.