From e55ec75a03af0bbd52f42ce0f0fd3ef08d1c417e Mon Sep 17 00:00:00 2001 From: Ziding Zhang Date: Thu, 30 Sep 2021 16:22:38 +0100 Subject: [PATCH 01/44] Create SECURITY.md A simple instruction for security researchers. Closes #226 --- SECURITY.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..5041b2f2 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report security issues to From 17249b441feb13e13ca05cc92a7c4406c662ab1f Mon Sep 17 00:00:00 2001 From: Ziding Zhang Date: Mon, 4 Oct 2021 14:48:48 +0100 Subject: [PATCH 02/44] Update SECURITY.md Kindly provide an email for the security policy. --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 5041b2f2..dda0074d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Please report security issues to +Please report security issues to *email* From fdbc7191eeb0a1ab4aacb1f281977b1322bfd458 Mon Sep 17 00:00:00 2001 From: 0x7zed <60039485+0x7zed@users.noreply.github.com> Date: Sat, 16 Oct 2021 10:04:00 +0100 Subject: [PATCH 03/44] Update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index dda0074d..25555a5e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Please report security issues to *email* +Please report security issues to seopanel@gmail.com From d0297cf36242cc8e435c295f2956d3396359ef8b Mon Sep 17 00:00:00 2001 From: Seo Panel Date: Sun, 17 Oct 2021 00:27:06 +0530 Subject: [PATCH 04/44] Update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 25555a5e..f5d91d90 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Please report security issues to seopanel@gmail.com +Please report security issues to support@seopanel.in From 502ba5fff71e4ddfb1c5e1624a0ec7170dae3e8a Mon Sep 17 00:00:00 2001 From: geo varghese Date: Mon, 18 Oct 2021 01:01:57 +0530 Subject: [PATCH 05/44] seo panel 4.11.0 - base changes and currency symbol fixes --- config/sp-config-sample.php | 2 +- install/data/seopanel.sql | 2 +- install/data/upgrade.sql | 27 +++++++++++++++++-------- install/data/upgrade_v4.9.0_v4.10.0.sql | 11 ++++++++++ install/install.class.php | 1 + install/sp-config-sample.php | 2 +- 6 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 install/data/upgrade_v4.9.0_v4.10.0.sql diff --git a/config/sp-config-sample.php b/config/sp-config-sample.php index 2c1cefff..c0831ecc 100644 --- a/config/sp-config-sample.php +++ b/config/sp-config-sample.php @@ -40,7 +40,7 @@ define('DB_ENGINE', 'mysql'); # The version of seo panel installed -define('SP_INSTALLED', '4.10.0'); +define('SP_INSTALLED', '4.11.0'); # The DB debug mode define('SP_DEBUG', 0); diff --git a/install/data/seopanel.sql b/install/data/seopanel.sql index c6d53be2..a4495f83 100644 --- a/install/data/seopanel.sql +++ b/install/data/seopanel.sql @@ -974,7 +974,7 @@ INSERT INTO `settings` (`id`, `set_label`, `set_name`, `set_val`, `set_category` (40, 'API Secret', 'API_SECRET', '', 'api', 'medium', 1), (41, 'Company Name', 'SP_COMPANY_NAME', 'Seo Panel', 'system', 'medium', 1), (42, 'Currency', 'SP_PAYMENT_CURRENCY', 'USD', 'system', 'medium', 1), -(43, 'Seo Panel version', 'SP_VERSION_NUMBER', '4.10.0', 'system', 'medium', 0), +(43, 'Seo Panel version', 'SP_VERSION_NUMBER', '4.11.0', 'system', 'medium', 0), (44, 'Moz API Link', 'SP_MOZ_API_LINK', 'http://lsapi.seomoz.com/linkscape', 'moz', 'medium', 0), (45, 'Moz API Link', 'SP_MOZ_API_ACCESS_ID', '', 'moz', 'large', 1), (46, 'Moz API Link', 'SP_MOZ_API_SECRET', '', 'moz', 'large', 1), diff --git a/install/data/upgrade.sql b/install/data/upgrade.sql index f5fac9c5..8256216b 100644 --- a/install/data/upgrade.sql +++ b/install/data/upgrade.sql @@ -1,12 +1,23 @@ -- --- Seo Panel 4.10.0 changes +-- Seo Panel 4.11.0 changes -- -update `settings` set set_val='4.10.0' WHERE `set_name` LIKE 'SP_VERSION_NUMBER'; -update `featured_directories` set status=0 WHERE `directory_name` LIKE 'directorymaximizer.com'; -UPDATE `seoplugins` SET `version` = '2.1.0' WHERE name='QuickWebProxy'; -INSERT INTO `qwp_settings` (`set_label`, `set_name`, `set_val`, `set_type`) VALUES ('Blocked Urls In Proxy', 'QWP_PROXY_BLOCK_URLS', '', 'text'); - - - +update `settings` set set_val='4.11.0' WHERE `set_name` LIKE 'SP_VERSION_NUMBER'; +UPDATE `currency` SET `symbol` = '€' WHERE `currency`.`id` = 23; +UPDATE `currency` SET `symbol` = 'د.إ' WHERE `currency`.`id` = 1; +UPDATE `currency` SET `symbol` = 'ƒ' WHERE `currency`.`id` = 2; +UPDATE `currency` SET `symbol` = '₩' WHERE `currency`.`id` = 36; +UPDATE `currency` SET `symbol` = '₡' WHERE `currency`.`id` = 18; +UPDATE `currency` SET `symbol` = 'Kč' WHERE `currency`.`id` = 19; +UPDATE `currency` SET `symbol` = 'E£' WHERE `currency`.`id` = 22; +UPDATE `currency` SET `symbol` = '₪' WHERE `currency`.`id` = 31; +UPDATE `currency` SET `symbol` = '¥' WHERE `currency`.`id` = 34; +UPDATE `currency` SET `symbol` = '₦' WHERE `currency`.`id` = 45; +UPDATE `currency` SET `symbol` = '﷼' WHERE `currency`.`id` = 48; +UPDATE `currency` SET `symbol` = '₱' WHERE `currency`.`id` = 50; +UPDATE `currency` SET `symbol` = 'Zł' WHERE `currency`.`id` = 51; +UPDATE `currency` SET `symbol` = '₽' WHERE `currency`.`id` = 54; +UPDATE `currency` SET `symbol` = 'ł' WHERE `currency`.`id` = 58; +UPDATE `currency` SET `symbol` = '₫' WHERE `currency`.`id` = 65; +UPDATE `currency` SET `symbol` = '¥' WHERE `currency`.`id` = 16; \ No newline at end of file diff --git a/install/data/upgrade_v4.9.0_v4.10.0.sql b/install/data/upgrade_v4.9.0_v4.10.0.sql new file mode 100644 index 00000000..63d21ba3 --- /dev/null +++ b/install/data/upgrade_v4.9.0_v4.10.0.sql @@ -0,0 +1,11 @@ +-- +-- Seo Panel 4.10.0 changes +-- + +update `settings` set set_val='4.10.0' WHERE `set_name` LIKE 'SP_VERSION_NUMBER'; +update `featured_directories` set status=0 WHERE `directory_name` LIKE 'directorymaximizer.com'; +UPDATE `seoplugins` SET `version` = '2.1.0' WHERE name='QuickWebProxy'; + + + + diff --git a/install/install.class.php b/install/install.class.php index 925b5ac5..3da51e0a 100644 --- a/install/install.class.php +++ b/install/install.class.php @@ -560,6 +560,7 @@ function getUpgradeDBFiles($db) { '4.7.0', '4.8.0', '4.9.0', + '4.10.0', ); // get current version number diff --git a/install/sp-config-sample.php b/install/sp-config-sample.php index eb4f3357..3f14c3ae 100644 --- a/install/sp-config-sample.php +++ b/install/sp-config-sample.php @@ -40,7 +40,7 @@ define('DB_ENGINE', '[DB_ENGINE]'); # The version of seo panel installed -define('SP_INSTALLED', '4.10.0'); +define('SP_INSTALLED', '4.11.0'); # The DB debug mode define('SP_DEBUG', 0); From a84e60f82f7d44aafb422ffea32fb341f5335887 Mon Sep 17 00:00:00 2001 From: geo varghese Date: Wed, 20 Oct 2021 01:46:13 +0530 Subject: [PATCH 06/44] sp 4.11.0 - fix for confir, flag not set to 1 when user created from admin side --- controllers/user.ctrl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/user.ctrl.php b/controllers/user.ctrl.php index a33b1505..ed37be49 100644 --- a/controllers/user.ctrl.php +++ b/controllers/user.ctrl.php @@ -444,9 +444,9 @@ function listUsers($info=[]) { # func to change status function __changeStatus($userId, $status){ - $userId = intval($userId); - $sql = "update users set status=$status where id=$userId"; + $confirmStr = !empty($status) ? ",confirm=1" : ""; + $sql = "update users set status=$status $confirmStr where id=$userId"; $this->db->query($sql); # deaactivate all websites under this user @@ -562,10 +562,10 @@ function createUser($userInfo, $renderResults = true){ if(!$this->validate->flagErr){ if (!$this->__checkUserName($userInfo['userName'])) { if (!$this->__checkEmail($userInfo['email'])) { - $sql = "insert into users(utype_id,username,password,first_name,last_name,email,created,status, expiry_date) + $sql = "insert into users(utype_id,username,password,first_name,last_name,email,created,status, expiry_date, confirm) values($userTypeId,'".addslashes($userInfo['userName'])."','".md5($userInfo['password'])."' ,'".addslashes($userInfo['firstName'])."', '".addslashes($userInfo['lastName'])."' - ,'".addslashes($userInfo['email'])."',UNIX_TIMESTAMP(),$userStatus, {$userInfo['expiry_date']})"; + ,'".addslashes($userInfo['email'])."',UNIX_TIMESTAMP(),$userStatus, {$userInfo['expiry_date']}, 1)"; $this->db->query($sql); // if render results From 502cfa06ef3eaf6da300ccca0045639721972812 Mon Sep 17 00:00:00 2001 From: geo varghese Date: Tue, 1 Feb 2022 02:29:19 +0530 Subject: [PATCH 07/44] sp 4.11.0 changes --- controllers/report.ctrl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/report.ctrl.php b/controllers/report.ctrl.php index 8d0e80d2..25bfc121 100644 --- a/controllers/report.ctrl.php +++ b/controllers/report.ctrl.php @@ -615,7 +615,7 @@ function generateReports( $searchInfo='' ) { # function to format pagecontent function formatPageContent($seInfoId, $pageContent) { if (!empty($this->seList[$seInfoId]['from_pattern']) && $this->seList[$seInfoId]['to_pattern']) { - $pattern = $this->seList[$seInfoId]['from_pattern']."(.*)".$this->seList[$seInfoId]['to_pattern']; + $pattern = $this->seList[$seInfoId]['from_pattern']."(.*?)".$this->seList[$seInfoId]['to_pattern']; if (preg_match("/$pattern/is", $pageContent, $matches)) { if (!empty($matches[1])) { $pageContent = $matches[1]; From 8f91b90b08a97fca5f9d58c10f9ab88843c2229b Mon Sep 17 00:00:00 2001 From: geo varghese Date: Wed, 16 Feb 2022 12:41:19 +0530 Subject: [PATCH 08/44] SP 4.11.0 - quick fixes for solving error form data population --- themes/classic/views/usertypes/edit.ctp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/classic/views/usertypes/edit.ctp.php b/themes/classic/views/usertypes/edit.ctp.php index 3e9af82e..243a4b20 100644 --- a/themes/classic/views/usertypes/edit.ctp.php +++ b/themes/classic/views/usertypes/edit.ctp.php @@ -128,7 +128,7 @@ : + - + diff --git a/themes/classic/views/review/quick_checker.ctp.php b/themes/classic/views/review/quick_checker.ctp.php index eada0a61..8e41a574 100644 --- a/themes/classic/views/review/quick_checker.ctp.php +++ b/themes/classic/views/review/quick_checker.ctp.php @@ -11,7 +11,7 @@ : - $serviceInfo){?> @@ -21,7 +21,14 @@ : - + + +

Eg:

+ @@ -35,4 +42,18 @@

-
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/themes/classic/views/review/review_report_summary.ctp.php b/themes/classic/views/review/review_report_summary.ctp.php index 9dc06967..cfe1679a 100644 --- a/themes/classic/views/review/review_report_summary.ctp.php +++ b/themes/classic/views/review/review_report_summary.ctp.php @@ -99,7 +99,7 @@ } $baseColCount = count($colList); -$colCount = ($baseColCount * 3) -1 ; +$colCount = ($baseColCount * 3); ?>
@@ -125,7 +125,8 @@ - + + @@ -159,6 +160,9 @@ + + + $colVal){ if ($colName == 'name') continue; diff --git a/themes/classic/views/review/review_reports.ctp.php b/themes/classic/views/review/review_reports.ctp.php index 37c0db03..0754ae24 100644 --- a/themes/classic/views/review/review_reports.ctp.php +++ b/themes/classic/views/review/review_reports.ctp.php @@ -1,4 +1,7 @@ - +
@@ -28,10 +31,13 @@ diff --git a/themes/simple/views/review/review_report_summary.ctp.php b/themes/simple/views/review/review_report_summary.ctp.php index d80e204c..0dcfbd1c 100644 --- a/themes/simple/views/review/review_report_summary.ctp.php +++ b/themes/simple/views/review/review_report_summary.ctp.php @@ -38,7 +38,7 @@ : - From 4d1cc159ed76cff4fb578e386e3b2611189596bc Mon Sep 17 00:00:00 2001 From: geo varghese Date: Fri, 20 May 2022 02:58:10 +0530 Subject: [PATCH 11/44] sp 4.11.0 - changes to fix pinterest and example link improvements --- controllers/social_media.ctrl.php | 18 +++++++++++ install/data/upgrade.sql | 2 ++ libs/spider.class.php | 3 ++ .../edit_social_media_link.ctp.php | 28 ++++++++++------ .../views/socialmedia/quick_checker.ctp.php | 32 ++++++++++++------- 5 files changed, 61 insertions(+), 22 deletions(-) diff --git a/controllers/social_media.ctrl.php b/controllers/social_media.ctrl.php index 9eae8b02..6d91b8c3 100644 --- a/controllers/social_media.ctrl.php +++ b/controllers/social_media.ctrl.php @@ -40,6 +40,7 @@ function __construct() { "follower" => $engineList['facebook']['regex2'], ], "url_part" => $engineList['facebook']['url_part'], + "example" => "https://www.facebook.com/seopanel", ], "twitter" => [ "label" => "Twitter", @@ -47,6 +48,7 @@ function __construct() { "regex" => [ "follower" => $engineList['twitter']['regex1'], ], + "example" => "https://twitter.com/seopanel", ], "instagram" => [ "label" => "Instagram", @@ -54,6 +56,7 @@ function __construct() { "follower" => $engineList['instagram']['regex1'], ], "url_part" => $engineList['instagram']['url_part'], + "example" => "https://www.instagram.com/seopanelorg/", ], "linkedin" => [ "label" => "LinkedIn", @@ -62,12 +65,14 @@ function __construct() { "follower" => $engineList['linkedin']['regex1'], ], "show_url" => "https://www.linkedin.com/company", + "example" => "14576538", ], "pinterest" => [ "label" => "Pinterest", "regex" => [ "follower" => $engineList['pinterest']['regex1'], ], + "example" => "https://www.pinterest.com/seopanel/", ], "youtube" => [ "label" => "Youtube", @@ -75,6 +80,7 @@ function __construct() { "follower" => $engineList['youtube']['regex1'], ], "url_part" => $engineList['youtube']['url_part'], + "example" => "https://www.youtube.com/c/seopanel", ], ]; @@ -420,6 +426,18 @@ function getSocialMediaDetails($smType, $smLink) { if (!empty($smInfo) && !empty($smLink)) { $smLink = $this->formatMediaLink($smType, $smLink); $smContentInfo = $this->spider->getContent($smLink); + + // testing val + /*$myfile = fopen(SP_TMPPATH . "/smcpage.html", "w") or die("Unable to open file!"); + fwrite($myfile, $smContentInfo['page']); + fclose($myfile); + exit; + + $smContentInfo = []; + $myfile = fopen(SP_TMPPATH . "/smcpage.html", "r") or die("Unable to open file!"); + $smContentInfo['page'] = fread($myfile,filesize(SP_TMPPATH . "/smcpage.html")); + fclose($myfile);*/ + if (!empty($smContentInfo['page'])) { $matches = []; diff --git a/install/data/upgrade.sql b/install/data/upgrade.sql index 773b0d98..dcaf2959 100644 --- a/install/data/upgrade.sql +++ b/install/data/upgrade.sql @@ -30,3 +30,5 @@ VALUES (NULL, 'trustpilot', 'review', '/\"reviewCount\":\"(\\d+)\"/is', '/\"rati INSERT INTO `crawl_engines` (`id`, `engine_name`, `engine_category`, `regex1`, `regex2`, `regex3`, `regex4`, `url`, `url_part`, `status`) VALUES (NULL, 'tripadvisor', 'review', '/\"reviewCount\":\"(\\d+)\"/is', '/\"ratingValue\":\"(\\d+\\.\\d+)\"/is', NULL, NULL, '', NULL, '1'); + +UPDATE `crawl_engines` SET `regex1` = '/\"follower_count\":(\\d+)/is' WHERE engine_name='pinterest' and engine_category='social_media'; \ No newline at end of file diff --git a/libs/spider.class.php b/libs/spider.class.php index f27626e0..6d424b67 100644 --- a/libs/spider.class.php +++ b/libs/spider.class.php @@ -61,6 +61,7 @@ function __construct() { // user agents $this->userAgentList['google'] = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"; $this->userAgentList['bing'] = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"; + $this->userAgentList['pinterest'] = "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"; $this->userAgentList['default'] = defined('SP_USER_AGENT') ? SP_USER_AGENT : $this->_CURLOPT_USERAGENT; } @@ -305,6 +306,8 @@ function getContent( $url, $enableProxy=true, $logCrawl = true) { $ugKey = 'google'; } else if (stristr($url, 'bing.')) { $ugKey = 'bing'; + } else if (stristr($url, 'pinterest.')) { + $ugKey = 'pinterest'; } $this->_CURLOPT_USERAGENT = $this->getUserAgent($ugKey); diff --git a/themes/classic/views/socialmedia/edit_social_media_link.ctp.php b/themes/classic/views/socialmedia/edit_social_media_link.ctp.php index cf6ed3ac..5ecb74ed 100644 --- a/themes/classic/views/socialmedia/edit_social_media_link.ctp.php +++ b/themes/classic/views/socialmedia/edit_social_media_link.ctp.php @@ -59,8 +59,14 @@ : + +

Eg:

+