Skip to content

Commit

Permalink
SuiteCRM 7.12.10 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jack7anderson7 committed Feb 27, 2023
1 parent 0805178 commit 34d2745
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img width="180px" height="41px" src="https://suitecrm.com/wp-content/uploads/2017/12/logo.png" align="right" />
</a>

# SuiteCRM 7.12.9
# SuiteCRM 7.12.10

[![Build Status](https://travis-ci.org/salesagility/SuiteCRM.svg?branch=hotfix)](https://travis-ci.org/salesagility/SuiteCRM)
[![codecov](https://codecov.io/gh/salesagility/SuiteCRM/branch/hotfix/graph/badge.svg)](https://codecov.io/gh/salesagility/SuiteCRM/branch/hotfix)
Expand Down
78 changes: 39 additions & 39 deletions files.md5

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions include/Dashlets/DashletRssFeedTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ public function readFeed()
public function getTitle()
{
$matches = array();
preg_match("/<title>.*?<\/title>/i", $this->contents, $matches);
preg_match("/<title>(.*?)<\/title>/i", $this->contents, $matches);
if (isset($matches[0])) {
$this->title = str_replace(array('<![CDATA[', '<title>', '</title>', ']]>'), '', $matches[0]);
$match = $matches[0];
if (isset($matches[1])) {
$match = '<title>' . htmlentities($matches[1] ?? '') . '</title>';
}
$this->title = str_replace(array('<![CDATA[', '<title>', '</title>', ']]>'), '', $match);
}
}

Expand Down
39 changes: 39 additions & 0 deletions include/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -2654,6 +2654,27 @@ function securexsskey($value, $die = true)
}
}

/**
* @param string|null $value
* @return string
*/
function purify_html(?string $value): string {

if (($value ?? '') === '') {
return '';
}

$cleanedValue = htmlentities(SugarCleaner::cleanHtml($value, true));
$decoded = html_entity_decode($cleanedValue);
$doubleDecoded = html_entity_decode($decoded);

if (stripos($decoded, '<script>') !== false || stripos($doubleDecoded, '<script>') !== false){
$cleanedValue = '';
}

return $cleanedValue;
}

function preprocess_param($value)
{
if (is_string($value)) {
Expand Down Expand Up @@ -6051,3 +6072,21 @@ function isAllowedModuleName(string $value): bool {

return false;
}

/**
* @param $endpoint
* @return bool
*/
function isSelfRequest($endpoint) : bool {
$domain = 'localhost';
if (isset($_SERVER["HTTP_HOST"])) {
$domain = $_SERVER["HTTP_HOST"];
}

$siteUrl = SugarConfig::getInstance()->get('site_url');
if (empty($siteUrl)){
$siteUrl = '';
}

return stripos($endpoint, $domain) !== false || stripos($endpoint, $siteUrl) !== false;
}
8 changes: 7 additions & 1 deletion modules/AOS_PDF_Templates/AOS_PDF_Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@ public function __construct()
parent::__construct();
}


public function cleanBean()
{
parent::cleanBean();
$this->pdfheader = purify_html($this->pdfheader);
$this->description = purify_html($this->description);
$this->pdffooter = purify_html($this->pdffooter);
}
}
4 changes: 1 addition & 3 deletions modules/Home/Dashlets/RSSDashlet/RSSDashlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ public function displayOptions()
* @param array $req $_REQUEST
* @return array filtered options to save
*/
public function saveOptions(
array $req
) {
public function saveOptions($req) {
$options = array();
$options['title'] = $req['title'];
$options['url'] = $req['url'];
Expand Down
4 changes: 4 additions & 0 deletions modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public function __construct($id, $options = null)
$this->url = $options['url'];
}

if (isSelfRequest($this->url)) {

This comment has been minimized.

Copy link
@SinergiaCRM

SinergiaCRM Nov 3, 2023

Contributor

Hi @jack7anderson7,

Why are we including this changes in this commit? Is there any PR where we can find information about this modification?

We use internal URLs to display information from other modules/components. And this changes including a big limitation for us. Is it security related?

Thanks

$this->url = '';
}

if (empty($options['height']) || (int)$options['height'] < 1) {
$this->height = 315;
} else {
Expand Down
4 changes: 2 additions & 2 deletions suitecrm_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
die('Not A Valid Entry Point');
}

$suitecrm_version = '7.12.9';
$suitecrm_timestamp = '2023-01-25 12:00:00';
$suitecrm_version = '7.12.10';
$suitecrm_timestamp = '2023-03-02 12:00:00';
2 changes: 1 addition & 1 deletion themes/SuiteP/css/Dawn/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/SuiteP/css/Day/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/SuiteP/css/Dusk/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/SuiteP/css/Night/style.css

Large diffs are not rendered by default.

0 comments on commit 34d2745

Please sign in to comment.