Changeset 1782465
- Timestamp:
- 12/07/2017 09:00:28 AM (8 years ago)
- Location:
- ose-firewall/trunk
- Files:
-
- 9 edited
-
assets/views/login.php (modified) (2 diffs)
-
assets/views/whitelistmgmt.php (modified) (2 diffs)
-
classes/App/Model/BaseModel.php (modified) (1 diff)
-
classes/Library/fwscannerv7/fwscannerv7.php (modified) (13 diffs)
-
classes/Library/fwscannerv7/fwstatsv7.php (modified) (2 diffs)
-
classes/Library/oem/oem.php (modified) (2 diffs)
-
ose_firewall_badge.php (modified) (1 diff)
-
ose_wordpress_firewall.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ose-firewall/trunk/assets/views/login.php
r1741247 r1782465 24 24 <div class="col-sm-4"> 25 25 <div class="vs-line-1"> 26 <a href="https://www.centrora.com/services/ subscribe">26 <a href="https://www.centrora.com/services/hosting-services-pricing"> 27 27 <div id="fw-overview" class="vs-line-1-title fw-hover"> <i class="fa fa-shopping-cart"></i></div> 28 28 <div class="vs-line-1-number"> … … 34 34 <div class="col-sm-4"> 35 35 <div class="vs-line-1"> 36 <a href="https://www.centrora.com/services ">36 <a href="https://www.centrora.com/services/hosting-services-pricing"> 37 37 <div id="fw-overview" class="vs-line-1-title fw-hover"> <i class="fa fa-info-circle"></i></div> 38 38 <div class="vs-line-1-number"> -
ose-firewall/trunk/assets/views/whitelistmgmt.php
r1762549 r1782465 57 57 <select class="form-control" id="statusfield" name ="statusfield"> 58 58 <option value="2"><?php oLang::_('O_SCANVARIABLES');?></option> 59 <option value="1"><?php oLang::_('O_FILTERVARIABLES');?></option>60 59 <option value="0"><?php oLang::_('O_WHITELISTVARIABLES');?></option> 61 60 </select> … … 145 144 <button data-target="#formModal" data-toggle="modal" class="upload-btns wl-btns"><i class="text-primary glyphicon glyphicon-plus-sign"></i> <?php oLang::_('ADD_A_VARIABLE'); ?></button> 146 145 <button class="upload-btns wl-btns" type="button" onClick="changeBatchItemStatus('scan')"><i class="text-block glyphicon glyphicon-minus-sign"></i> <?php oLang::_('SCAN_VARIABLE'); ?></button> 147 <button class="upload-btns wl-btns" type="button" onClick="changeBatchItemStatus('filter')"><i class="text-yellow glyphicon glyphicon-eye-open"></i> <?php oLang::_('FILTER_VARIABLE'); ?></button>148 146 <button class="upload-btns wl-btns" type="button" onClick="changeBatchItemStatus('whitelist')"><i class="text-success glyphicon glyphicon-ok-sign"></i> <?php oLang::_('IGNORE_VARIABLE'); ?></button> 149 147 <?php -
ose-firewall/trunk/classes/App/Model/BaseModel.php
r1730340 r1782465 519 519 return '<div class="row row-set" style="margin-top:14px;"> 520 520 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 521 <a href="https://www.centrora.com/services/ " target="_blank"><div class="call-to-action">521 <a href="https://www.centrora.com/services/hosting-services-pricing" target="_blank"><div class="call-to-action"> 522 522 <div class="call-to-action-txt"> 523 523 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'/images/C_puma.png"> -
ose-firewall/trunk/classes/Library/fwscannerv7/fwscannerv7.php
r1765585 r1782465 64 64 private $allowExts = array(); 65 65 protected $replaced = array(); 66 protected $detected_whitelistedVars = array(); 67 protected $orignal_request_backup = array(); 66 68 67 69 //run shell commands … … 808 810 $subscription_status = oseFirewallBase::checkSubscriptionStatus(false); 809 811 $this->type = $type; 810 811 812 $request = $this->getRequestVariables($type); 812 813 $this->original_request = $request; //store the value of original request 813 814 $this->detected_pentest = false; 815 $this->orignal_request_backup = $request; 814 816 if(is_array($request) && !empty($request)) 815 817 { 816 $flatarray = $this->array_flatten($request); 817 818 //remove white listed vars 819 $request_variablesfiltered = $this->removeWhiteListVariable($request,$type); 820 $flatarray = $this->array_flatten($request_variablesfiltered); 818 821 $request_stringsfiltered = $this->hasWhiteListString(); 819 822 if(array_key_exists('accountpath',$flatarray)) … … 822 825 } 823 826 if(!$request_stringsfiltered) 824 {827 { 825 828 //does not have any white list string 826 $request_variablesfiltered = $this->removeWhiteListVariable($flatarray);827 //removed all the whitelisted variables829 unset($request_variablesfiltered); 830 $request_variablesfiltered = $flatarray; 828 831 if(!empty($request_variablesfiltered)) 829 832 { … … 866 869 if($this->detected_pentest== false) 867 870 { 868 $completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered); 871 $temp_completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered); 872 $completereq = $this->addWhiteListedVarsBack($temp_completereq); 869 873 $this->setRequestVariables($completereq,$type); 870 874 } 871 875 else { 872 $completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered_decoded); 876 $temp_completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered_decoded); 877 $completereq = $this->addWhiteListedVarsBack($temp_completereq); 873 878 $this->setRequestVariables($completereq,$type); 874 879 } … … 881 886 if($this->detected_pentest == false) 882 887 { 883 $completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered); 888 $temp_completereq = $this->getTheOriginalArrayStrucutre($request_variablesfiltered); 889 $completereq = $this->addWhiteListedVarsBack($temp_completereq); 884 890 $this->setRequestVariables($completereq,$type); 885 891 }else { 886 $completereq = $this->getTheOriginalArrayStrucutre($temp); 892 $temp_completereq = $this->getTheOriginalArrayStrucutre($temp); 893 $completereq = $this->addWhiteListedVarsBack($temp_completereq); 887 894 $this->setRequestVariables($completereq,$type); 888 895 } … … 892 899 } 893 900 unset($this->completerequest); 901 unset($this->detected_whitelistedVars); 894 902 // return $result; 895 903 return false; … … 900 908 ////continue 901 909 //return true //safe to use 910 unset($this->detected_whitelistedVars); 902 911 return true; 903 912 } … … 905 914 else{ 906 915 //white list string was detected 916 unset($this->detected_whitelistedVars); 907 917 return true; 908 918 } … … 911 921 { 912 922 return true; 923 } 924 } 925 926 927 //white list variables are removed from the scanning request 928 //add them back to make sure the white listed vars are not ignored in the final requets 929 public function addWhiteListedVarsBack($filtered_request) 930 { 931 if(!empty($this->detected_whitelistedVars)) 932 { 933 foreach($this->detected_whitelistedVars as $whitelistedVarKey) 934 { 935 if(isset($this->orignal_request_backup[$whitelistedVarKey])) 936 { 937 $filtered_request[$whitelistedVarKey] = $this->orignal_request_backup[$whitelistedVarKey]; 938 } 939 } 940 return $filtered_request; 941 }else{ 942 return $filtered_request; 913 943 } 914 944 } … … 1235 1265 1236 1266 //check if the the white listed variables from the user exists in the request 1237 public function removeWhiteListVariable($temp )1267 public function removeWhiteListVariable($temp,$type) 1238 1268 { 1239 1269 $variablelist = null; … … 1244 1274 }else 1245 1275 { 1246 $whiteListVariables = $this->getWhiteListedVariables($variablelist );1276 $whiteListVariables = $this->getWhiteListedVariables($variablelist,$type); 1247 1277 foreach($temp as $reqkey => $reqvalue) 1248 1278 { 1249 1279 if(in_array(urldecode($reqkey),$whiteListVariables)) 1250 1280 { 1281 array_push($this->detected_whitelistedVars,$reqkey); 1251 1282 unset($temp[$reqkey]); 1252 1283 } … … 1256 1287 } 1257 1288 1258 public function getWhiteListedVariables($variablelist )1289 public function getWhiteListedVariables($variablelist,$type) 1259 1290 { 1260 1291 $whiteListVariables = array(); … … 1262 1293 { 1263 1294 $temp = explode('.',$record['variable']); 1264 array_push($whiteListVariables,$temp[1]); 1295 if($temp[0] == $type || $temp[0] == strtolower($type)) 1296 { 1297 array_push($whiteListVariables,$temp[1]); 1298 } 1265 1299 } 1266 1300 return $whiteListVariables; -
ose-firewall/trunk/classes/Library/fwscannerv7/fwstatsv7.php
r1741247 r1782465 185 185 if(is_array($valuesArray)) 186 186 { 187 $strings = implode("<br/>",$valuesArray); 187 if(count($valuesArray) == 1) 188 { 189 $temp_strings = explode('#',$valuesArray[0]); 190 $strings = $temp_strings[0]; 191 }else{ 192 $temp_string = $valuesArray; 193 $strings = implode("",$temp_string); 194 } 188 195 $finalString = '<td class=\'shrink\' ><a href=\'javascript:void(0);\' title = \'Click to white List the variable\' onClick="whitelist_confirm(\'' . $strings . '\')">'.$strings."</a></td>"; 189 196 return $finalString; … … 193 200 $finalString = '<td class=\'shrink\'>'.$valuesArray."</a></td>"; 194 201 }else{ 195 $finalString = '<td class=\'shrink\' ><a href=\'javascript:void(0);\' title = \'Click to white List the variable\' onClick="whitelist_confirm(\'' . $valuesArray . '\')">'.$valuesArray."</a></td>"; 202 $temp_strings = explode('#',$valuesArray[0]); 203 $finalString = '<td class=\'shrink\' ><a href=\'javascript:void(0);\' title = \'Click to white List the variable\' onClick="whitelist_confirm(\'' . $temp_strings[0] . '\')">'.$temp_strings[0]."</a></td>"; 196 204 } 197 205 return $finalString; -
ose-firewall/trunk/classes/Library/oem/oem.php
r1741247 r1782465 99 99 <li><a href="https://www.centrora.com/my-account" title="My Account"><i class="glyphicon glyphicon-user"></i> <span class="hidden-xs hidden-sm hidden-md">My Account</span> </a></li> 100 100 <li><a href="https://www.centrora.com/support" id="support-center" title="Support"><i class="glyphicon glyphicon-cd"></i> <span class="hidden-xs hidden-sm hidden-md">Support</span></a></li> 101 <li><a href="https://www.centrora.com/services/ subscribe" title="Subscription"><i class="glyphicon glyphicon-share-alt"></i> <span class="hidden-xs hidden-sm hidden-md">Subscription</span></a></li>101 <li><a href="https://www.centrora.com/services/hosting-services-pricing" title="Subscription"><i class="glyphicon glyphicon-share-alt"></i> <span class="hidden-xs hidden-sm hidden-md">Subscription</span></a></li> 102 102 <li><a href="https://docs.centrora.com/en/latest/" title="Tutorial"><i class="glyphicon glyphicon-book"></i> <span class="hidden-xs hidden-sm hidden-md">Tutorial</span></a></li> 103 <li><a href="https://www.centrora.com/services " title="Malware Removal"><i class="glyphicon glyphicon-screenshot"></i> <span class="hidden-xs hidden-sm hidden-md">Malware Removal</span></a></li>';103 <li><a href="https://www.centrora.com/services/hosting-services-pricing" title="Malware Removal"><i class="glyphicon glyphicon-screenshot"></i> <span class="hidden-xs hidden-sm hidden-md">Malware Removal</span></a></li>'; 104 104 return $urls; 105 105 } … … 245 245 if (!(defined('OSE_OEM_URL_PREMIUM_TUT'))) define('OSE_OEM_URL_PREMIUM_TUT', 'https://docs.centrora.com/en/latest/activate-premium.html'); 246 246 if (!(defined('OSE_OEM_URL_AFFILIATE'))) define('OSE_OEM_URL_AFFILIATE', 'https://www.centrora.com/services/affiliate'); 247 if (!(defined('OSE_OEM_URL_SUBSCRIBE'))) define('OSE_OEM_URL_SUBSCRIBE', 'https://www.centrora.com/services/ subscribe');247 if (!(defined('OSE_OEM_URL_SUBSCRIBE'))) define('OSE_OEM_URL_SUBSCRIBE', 'https://www.centrora.com/services/hosting-services-pricing'); 248 248 if (!(defined('OSE_OEM_LANG_TAG'))) define('OSE_OEM_LANG_TAG',''); 249 249 } -
ose-firewall/trunk/ose_firewall_badge.php
r1775810 r1782465 4 4 Description: Plugin For Showing Centrora Security Badge 5 5 Author: Centrora Security 6 Version: 7.1. 16 Version: 7.1.3 7 7 */ 8 8 include(dirname(__FILE__).'/includes/oseBadgeWidget.php'); -
ose-firewall/trunk/ose_wordpress_firewall.php
r1775810 r1782465 5 5 Description: Centrora Security (previously OSE Firewall) - A WordPress Security Firewall plugin created by Centrora. Protect your WordPress site by identify any malicious codes, spam, virus, SQL injection, and security vulnerabilities. 6 6 Author: Centrora (Previously ProWeb) 7 Version: 7.1. 17 Version: 7.1.3 8 8 Author URI: http://www.centrora.com/ 9 9 */ -
ose-firewall/trunk/readme.txt
r1775810 r1782465 6 6 Requires at least: 3.7 7 7 Tested up to: 4.8.2 8 Stable tag: 7.1. 18 Stable tag: 7.1.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 170 170 171 171 == Changelog == 172 173 = 7.1.3 = 174 * Bug fix : Update links 175 176 = 7.1.2 = 177 * Bug fix : detecting Joomla version ,change in the location of version.php file 178 * Bug fix :Fixed var management bug - add white listed vars to request back 179 * Updated version tags 172 180 173 181 = 7.1.1 =
Note: See TracChangeset
for help on using the changeset viewer.