Changeset 1775810
- Timestamp:
- 11/27/2017 04:01:02 AM (8 years ago)
- Location:
- ose-firewall/trunk
- Files:
-
- 17 edited
-
assets/config/joomla.php (modified) (1 diff)
-
assets/config/wordpress.php (modified) (1 diff)
-
classes/App/Model/CronjobsModel.php (modified) (3 diffs)
-
classes/App/Model/GitbackupModel.php (modified) (1 diff)
-
classes/App/Model/GitbackupsuiteModel.php (modified) (1 diff)
-
classes/Library/gitBackup/GitSetup.php (modified) (4 diffs)
-
classes/Library/gitBackup/GitSetupsuite.php (modified) (3 diffs)
-
classes/Library/vsscanner/cfscanner.php (modified) (3 diffs)
-
classes/Library/vsscanner/vsscanner.php (modified) (6 diffs)
-
classes/Library/vsscanner/vsscannerpremium.php (modified) (2 diffs)
-
ose_firewall_badge.php (modified) (1 diff)
-
ose_wordpress_firewall.php (modified) (1 diff)
-
public/js/cfscan.js (modified) (1 diff)
-
public/js/cronjobs.js (modified) (2 diffs)
-
public/js/gitbackup.js (modified) (1 diff)
-
public/js/gitbackupsuite.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ose-firewall/trunk/assets/config/joomla.php
r1741247 r1775810 171 171 define("OSE_FILTER_EMAIL_NOTIFI",OSE_WEBLOGFOLDER.ODS."emailNotification.php"); 172 172 define('OSE_VIRUSPATTERN_FILE_FW7',OSE_WEBLOG_BACKUPFOLDER . ODS . "pattern.php"); 173 define('OSE_CHUNKSIZE_FILE',OSE_FWDATA.ODS."chunksize.php"); 173 174 ?> -
ose-firewall/trunk/assets/config/wordpress.php
r1730340 r1775810 122 122 define("OSE_FILTER_EMAIL_NOTIFI",OSE_WEBLOGFOLDER.ODS."emailNotification.php"); 123 123 define('OSE_VIRUSPATTERN_FILE_FW7',OSE_WEBLOG_BACKUPFOLDER . ODS . "pattern.php"); 124 define('OSE_CHUNKSIZE_FILE',OSE_FWDATA.ODS."chunksize.php"); 124 125 ?> -
ose-firewall/trunk/classes/App/Model/CronjobsModel.php
r1741247 r1775810 216 216 if($isremotereposet['status'] ==1) 217 217 { 218 unset($isremotereposet); 218 219 $isremotereposet = true; 219 220 }else{ 221 unset($isremotereposet); 220 222 $isremotereposet = false; 221 223 } 222 224 $repoBare = $gitbackup->checkisRepoBare(); 223 225 } 224 if($isremotereposet ['status']==1&& $repoBare == false)226 if($isremotereposet==true && $repoBare == false) 225 227 { 226 228 $menu .= '<option value="2">Cloud Backup </option>'; … … 241 243 if($isremotereposet['status'] ==1) 242 244 { 245 unset($isremotereposet); 243 246 $isremotereposet = true; 244 247 }else{ 248 unset($isremotereposet); 245 249 $isremotereposet = false; 246 250 } … … 267 271 if($isremotereposet['status'] ==1) 268 272 { 273 unset($isremotereposet); 269 274 $isremotereposet = true; 270 275 }else{ 276 unset($isremotereposet); 271 277 $isremotereposet = false; 272 278 } -
ose-firewall/trunk/classes/App/Model/GitbackupModel.php
r1730340 r1775810 78 78 { 79 79 $result = $this->gitbackup->getGitLogFromDb(); 80 $result['draw'] = $this->getInt('draw'); 80 81 return $result; 81 82 } -
ose-firewall/trunk/classes/App/Model/GitbackupsuiteModel.php
r1730897 r1775810 75 75 { 76 76 $result = $this->gitbackupsuite->getGitLogfromDB_suite($accountname,$accountpath); 77 $result['draw'] = $this->getInt('draw'); 77 78 return $result; 78 79 } -
ose-firewall/trunk/classes/Library/gitBackup/GitSetup.php
r1730340 r1775810 240 240 public function getGitLogFromDb() 241 241 { 242 $limit = oRequest::getInt('length', 15); 243 $start = oRequest::getInt('start', 0); 242 244 $dbReady = oseFirewall::isDBReady(); 243 245 if ($dbReady == true) { 246 if (!empty($limit)) { 247 $this->getLimitStm($start, $limit); 248 } 244 249 $db = oseFirewall::getDBO(); 245 $query = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1 ";250 $query = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1 ORDER BY `id` DESC". " " . $this->limitStm;; 246 251 $db->setQuery($query); 247 252 $result = $db->loadResultList(); … … 256 261 $array = array(); 257 262 if (!empty($result)) { 258 $tmps = array_reverse($result);263 $tmps = ($result); 259 264 foreach ($tmps as $tmp) { 260 265 if (!empty($tmp['commit_id'])) { … … 284 289 $data['data'] = ""; 285 290 } 286 $data['recordsTotal'] = count($result);287 $data['recordsFiltered'] = count($result);291 $data['recordsTotal'] = $this->getAllLogRecordCount(); 292 $data['recordsFiltered'] = $data['recordsTotal'] ; 288 293 return $data; 294 } 295 296 public function getAllLogRecordCount() 297 { 298 // Get total count 299 $sql = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1 "; 300 $this->db->setQuery($sql); 301 $result = $this->db->loadResultList(); 302 return count($result); 303 } 304 305 protected function getLimitStm($start, $limit) 306 { 307 if (!empty($limit)) { 308 $this->limitStm = " LIMIT " . (int)$start . ", " . (int)$limit; 309 } 289 310 } 290 311 … … 452 473 { 453 474 if (isset($_SESSION[$key])) { 454 if ($_SESSION[$key] != null ) {475 if ($_SESSION[$key] != null && $_SESSION[$key]!== "undefined") { 455 476 return $_SESSION[$key]; 456 477 } else { -
ose-firewall/trunk/classes/Library/gitBackup/GitSetupsuite.php
r1730897 r1775810 948 948 public function getGitLogfromDB_suite($accountname, $accountpath) 949 949 { 950 $limit = oRequest::getInt('length', 15); 951 $start = oRequest::getInt('start', 0); 950 952 $accountname = oseFirewallBase::cleanupVar($accountname); 951 953 if (!isset($this->accountDb)) { 952 954 $this->setUpDatabseObject($accountname); 953 955 } 954 $query = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1"; 956 if (!empty($limit)) { 957 $this->getLimitStm($start, $limit); 958 } 959 $query = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1 ORDER BY `id` DESC". " " . $this->limitStm;; 955 960 $this->accountDb->setQuery($query); 956 961 $result = $this->accountDb->loadResultList(); … … 965 970 $array = array(); 966 971 if (!empty($result)) { 967 $tmps = array_reverse($result);972 $tmps = ($result); 968 973 foreach ($tmps as $tmp) { 969 974 if (!empty($tmp['commit_id'])) { … … 993 998 $data['data'] = ""; 994 999 } 995 $data['recordsTotal'] = count($result);996 $data['recordsFiltered'] = count($result);1000 $data['recordsTotal'] = $this->getAllLogRecordCount(); 1001 $data['recordsFiltered'] = $data['recordsTotal'] ; 997 1002 return $data; 998 1003 } 1004 1005 public function getAllLogRecordCount() 1006 { 1007 // Get total count 1008 $sql = "SELECT * FROM `#__osefirewall_gitlog` WHERE 1 "; 1009 $this->accountDb->setQuery($sql); 1010 $result = $this->accountDb->loadResultList(); 1011 return count($result); 1012 } 1013 1014 protected function getLimitStm($start, $limit) 1015 { 1016 if (!empty($limit)) { 1017 $this->limitStm = " LIMIT " . (int)$start . ", " . (int)$limit; 1018 } 1019 } 1020 1021 999 1022 1000 1023 -
ose-firewall/trunk/classes/Library/vsscanner/cfscanner.php
r1762549 r1775810 409 409 foreach ($joomlaDirs as $joomlaDir) { 410 410 if (is_dir($dir . ODS . $joomlaDir) && $joomlaDir == 'libraries') { 411 $joomlaVersionFile = $dir . ODS . $joomlaDir . ODS . 'cms/version/version.php'; 411 $joomlaVersionFile = $dir . ODS . $joomlaDir . ODS . 'src/Version.php'; 412 $joomlaVersionFile1 = $dir . ODS . $joomlaDir . ODS . 'cms/version/version.php'; 412 413 if (file_exists($joomlaVersionFile)) { 413 414 $versionContent = file_get_contents($joomlaVersionFile); … … 417 418 $result['message'] = '<label>Joomla Site</label>'; 418 419 $result['version'] = $joomla_version; 419 } else { 420 $result['cms'] = false; 421 } 422 } 423 } 420 return $result; 421 } 422 if (file_exists($joomlaVersionFile1)) { 423 $versionContent = file_get_contents($joomlaVersionFile1); 424 preg_match_all("/(RELEASE|DEV_LEVEL) = ('\d+'|'\d.\d+')/", $versionContent, $output_array); 425 $joomla_version = str_replace("'", "", $output_array[2][0]) . '.' . str_replace("'", "", $output_array[2][1]); 426 $result['cms'] = 'jm'; 427 $result['message'] = '<label>Joomla Site</label>'; 428 $result['version'] = $joomla_version; 429 return $result; 430 } 431 } 432 } 433 $result['cms'] = false; 424 434 return $result; 425 435 } … … 438 448 $result['version'] = $wp_version; 439 449 return $result; 440 } else { 441 $result['cms'] = false; 442 return $result; 443 } 444 } 445 } 450 } 451 } 452 } 453 $result['cms'] = false; 446 454 return $result; 447 455 } -
ose-firewall/trunk/classes/Library/vsscanner/vsscanner.php
r1762549 r1775810 61 61 oseFirewall::loadFiles(); 62 62 date_default_timezone_set('Australia/Melbourne'); 63 $this->setDefaultChunkSize(); 64 } 65 66 private function setDefaultChunkSize() 67 { 68 if(file_exists(OSE_CHUNKSIZE_FILE)) 69 { 70 $this->chunksize = $this->getChunkSize(); 71 }else{ 72 $this->chunksize = 50 ; 73 } 63 74 } 64 75 private function setClamd () { … … 532 543 { 533 544 $total = count($files); 545 $this->setChunkSize($total); 546 $this->writeChunkSizeValue($this->chunksize); 534 547 // Get the toal number of batches 535 548 $this->size = (($total - $total % $this->chunksize) / $this->chunksize + 1) - 1; 536 549 $this->saveFilesFile($files, $total); 550 } 551 } 552 553 protected function setChunkSize($nooffiles) 554 { 555 $temp_size = (($nooffiles - $nooffiles % $this->chunksize) / $this->chunksize + 1) - 1; 556 if($temp_size<=723 && $this->chunksize<=60) 557 { 558 return true; 559 }else{ 560 $this->chunksize++; 561 if($this->chunksize>60) 562 { 563 $this->chunksize = 50; 564 return true; 565 } 566 $this->setChunkSize($nooffiles); 537 567 } 538 568 } … … 932 962 $this->sendEmail($return['totalvs']); 933 963 } 964 $this->deleteChunksizeFile(); 934 965 return $return; 935 966 } … … 964 995 $this->sendEmail($return['totalvs']); 965 996 } 997 $this->deleteChunksizeFile(); 966 998 return $return; 967 999 } elseif ($process == $size) { … … 991 1023 $this->sendEmail($return['totalvs']); 992 1024 } 1025 $this->deleteChunksizeFile(); 993 1026 return $return; 994 1027 } … … 1655 1688 } 1656 1689 } 1690 1691 public function writeChunkSizeValue($value) 1692 { 1693 $this->deleteChunksizeFile(); 1694 $contenttoput = "<?php\n" . '$chunksizevalue = ' . var_export($value, true) . ";"; 1695 $result = file_put_contents(OSE_CHUNKSIZE_FILE, $contenttoput); 1696 return $result; 1697 } 1698 1699 public function getChunkSize() 1700 { 1701 $chunksizevalue = 50; 1702 if(file_exists(OSE_CHUNKSIZE_FILE)) 1703 { 1704 require (OSE_CHUNKSIZE_FILE); 1705 } 1706 return $chunksizevalue; 1707 } 1708 1709 public function deleteChunksizeFile() 1710 { 1711 if(file_exists(OSE_CHUNKSIZE_FILE)) 1712 { 1713 unlink(OSE_CHUNKSIZE_FILE); 1714 } 1715 1716 } 1717 1657 1718 } 1658 1719 ?> -
ose-firewall/trunk/classes/Library/vsscanner/vsscannerpremium.php
r1730340 r1775810 135 135 $this->sendEmail($return['totalvs']); 136 136 } 137 $this->deleteChunksizeFile(); 137 138 return $return; 138 139 } elseif ($process == $size) { … … 163 164 $this->sendEmail($return['totalvs']); 164 165 } 166 $this->deleteChunksizeFile(); 165 167 return $return; 166 168 } else { -
ose-firewall/trunk/ose_firewall_badge.php
r1765585 r1775810 4 4 Description: Plugin For Showing Centrora Security Badge 5 5 Author: Centrora Security 6 Version: 7.1. 06 Version: 7.1.1 7 7 */ 8 8 include(dirname(__FILE__).'/includes/oseBadgeWidget.php'); -
ose-firewall/trunk/ose_wordpress_firewall.php
r1765585 r1775810 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. 07 Version: 7.1.1 8 8 Author URI: http://www.centrora.com/ 9 9 */ -
ose-firewall/trunk/public/js/cfscan.js
r1762549 r1775810 397 397 $('#cf-sig').text('Checking Core Files version ...'); 398 398 $('#icon-refresh').prop('onclick',null).off('click'); 399 $('#cf-div-uptodate').hide(); 399 400 $.ajax({ 400 401 type: "POST", -
ose-firewall/trunk/public/js/cronjobs.js
r1765585 r1775810 204 204 //can use the gitbackup cron jobs 205 205 getBackupTypeMenu(); 206 hideLoading();207 206 }else 208 207 { … … 258 257 }, 259 258 success: function (data) { 259 hideLoading(); 260 260 if(data.status == 1) 261 261 { -
ose-firewall/trunk/public/js/gitbackup.js
r1730340 r1775810 10 10 var gitBackupDataTable = $('#gitBackupTable').dataTable({ 11 11 processing: true, 12 ordering: false, 13 searching: false, 12 14 serverSide: true, 13 paging: false,15 paging: true, 14 16 bFilter: false, 15 17 ajax: { -
ose-firewall/trunk/public/js/gitbackupsuite.js
r1730897 r1775810 1504 1504 var gitBackupDataTable = $('#gitBackupTable').dataTable({ 1505 1505 processing: true, 1506 ordering: false, 1507 searching: false, 1506 1508 serverSide: true, 1507 paging: false,1509 paging: true, 1508 1510 bFilter: false, 1509 1511 ajax: { -
ose-firewall/trunk/readme.txt
r1765585 r1775810 6 6 Requires at least: 3.7 7 7 Tested up to: 4.8.2 8 Stable tag: 7.1. 08 Stable tag: 7.1.1 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.1 = 174 * Added pagination for the Git backup page 175 * Minor bug fixes for Git backup 176 * Minor bug fix for the core directory scanner 177 * Bug fixes for the virus scanner 172 178 173 179 = 7.1.0 =
Note: See TracChangeset
for help on using the changeset viewer.