Skip to content

Commit

Permalink
Check in 1.7.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gwanglst committed Apr 29, 2022
1 parent e6fad37 commit ca01927
Show file tree
Hide file tree
Showing 81 changed files with 290 additions and 152 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_CMAKE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${MY_CMAKE_FLAGS}")


add_definitions(-DDISABLE_OBJ_POOL)
#set(MY_CMAKE_POOL_FLAG " -DPOOL_TESTING -DUSE_VALGRIND")
#add_definitions(-DPOOL_TESTING)
#add_definitions(-DLS_WORKCREW_DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion LSQUICCOMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
497ec21d1605aeaaa21fb2e67066d7d47e3d916d
e237d779199dab262c54d104238006efa9abd766
2 changes: 1 addition & 1 deletion dist/add-ons/webcachemgr/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.11.1
1.13.13.1
7 changes: 5 additions & 2 deletions dist/add-ons/webcachemgr/src/Panel/ControlPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* LiteSpeed Web Server Cache Manager
*
* @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @copyright (c) 2017-2021
* @copyright (c) 2017-2022
* ******************************************* */

namespace Lsc\Wp\Panel;
Expand Down Expand Up @@ -36,7 +36,7 @@ abstract class ControlPanel
/**
* @var string
*/
const PANEL_API_VERSION = '1.13.11.1';
const PANEL_API_VERSION = '1.13.13.1';

/**
* @since 1.9
Expand Down Expand Up @@ -986,6 +986,9 @@ public static function meetsMinAPIVerRequirement()
public static function checkPanelAPICompatibility( $panelAPIVer )
{
$supportedAPIVers = array(
'1.13.13.1',
'1.13.13',
'1.13.12',
'1.13.11.1',
'1.13.11',
'1.13.10.2',
Expand Down
2 changes: 1 addition & 1 deletion dist/add-ons/webcachemgr/src/Panel/CustomPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Lsc\Wp\Panel;

use \Lsc\Wp\WPInstall;
use Lsc\Wp\WPInstall;

class CustomPanel
extends CustomPanelBase
Expand Down
16 changes: 9 additions & 7 deletions dist/add-ons/webcachemgr/src/PluginVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* LiteSpeed Web Server Cache Manager
*
* @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @copyright (c) 2018-2020
* @copyright (c) 2018-2022
* *******************************************
*/

Expand Down Expand Up @@ -416,17 +416,19 @@ protected function refreshVersionList( $isforced = false )
if ( $isforced || !file_exists($this->versionFile)
|| (time() - filemtime($this->versionFile)) > 86400 ) {

$content = Util::get_url_contents($versionsUrl);

if ( !empty($content) ) {
if ( !file_exists(Context::LOCAL_PLUGIN_DIR) ) {
$this->createDownloadDir();
}

if ( !file_exists(Context::LOCAL_PLUGIN_DIR) ) {
$this->createDownloadDir();
}
$content = Util::get_url_contents($versionsUrl);

if ( !empty($content) && substr($content, 0, 7) == 'allowed' ) {
file_put_contents($this->versionFile, $content);
Logger::info('LSCache for WordPress version list updated');
}
else {
touch($this->versionFile);
}
}
}

Expand Down
66 changes: 66 additions & 0 deletions dist/add-ons/webcachemgr/src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,4 +466,70 @@ public static function rrmdir( $dir, $keepParent = false )
return false;
}

/**
* Wrapper for idn_to_utf8() function call to avoid "undefined" exceptions
* when PHP intl module is not installed and enabled.
*
* @since 1.13.13.1
*
* @param string $domain
* @param int $flags
* @param int|null $variant
* @param array|null $idna_info
*
* @return false|string
*/
public static function tryIdnToUtf8(
$domain,
$flags = 0,
$variant = null,
array &$idna_info = null )
{
if ( function_exists('idn_to_utf8') ) {

if ( $variant == null ) {
$variant = INTL_IDNA_VARIANT_UTS46;
}

return idn_to_utf8($domain, $flags, $variant, $idna_info);
}

return $domain;
}

/**
* Wrapper for idn_to_ascii() function call to avoid "undefined" exceptions
* when PHP intl module is not installed and enabled.
*
* @since 1.13.13.1
*
* @param string $domain
* @param int|null $flags
* @param int|null $variant
* @param array|null $idna_info
*
* @return false|string
*/
public static function tryIdnToAscii(
$domain,
$flags = null,
$variant = null,
array &$idna_info = null )
{
if ( function_exists('idn_to_ascii') ) {

if ($flags = null ) {
$flags = IDNA_DEFAULT;
}

if ( $variant == null ) {
$variant = INTL_IDNA_VARIANT_UTS46;
}

return idn_to_ascii($domain, $flags, $variant, $idna_info);
}

return $domain;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use \Lsc\Wp\Context\Context;
use \Lsc\Wp\LSCMException;
use \Lsc\Wp\PluginVersion;
use Lsc\Wp\Util;
use \Lsc\Wp\WPInstall;

class CacheMgrRowViewModel
Expand Down Expand Up @@ -79,7 +80,9 @@ protected function setListRowData()
'statusData' =>
$this->getStatusDisplayData(),
'flagData' => $this->getFlagDisplayData(),
'siteUrl' => $this->wpInstall->getData(WPInstall::FLD_SITEURL)
'siteUrl' => Util::tryIdnToUtf8(
$this->wpInstall->getData(WPInstall::FLD_SITEURL)
)
);

$listData[$this->wpInstall->getPath()] = $info;
Expand Down
5 changes: 4 additions & 1 deletion dist/add-ons/webcachemgr/src/View/Model/ManageViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace Lsc\Wp\View\Model;

use \Lsc\Wp\Context\Context;
use Lsc\Wp\Util;
use \Lsc\Wp\WPInstallStorage;
use \Lsc\Wp\WPInstall;
use \Lsc\Wp\PluginVersion;
Expand Down Expand Up @@ -255,7 +256,9 @@ protected function setListAndCountData()
$this->getStatusDisplayData($wpInstall, $countData),
'flagData' =>
$this->getFlagDisplayData($wpInstall, $countData),
'siteUrl' => $wpInstall->getData(WPInstall::FLD_SITEURL)
'siteUrl' => Util::tryIdnToUtf8(
$wpInstall->getData(WPInstall::FLD_SITEURL)
)
);

$listData[$wpInstall->getPath()] = $info;
Expand Down
21 changes: 14 additions & 7 deletions dist/add-ons/webcachemgr/src/WPInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function __toString()
$this->path,
$this->data[self::FLD_STATUS],
$this->data[self::FLD_DOCROOT],
$this->data[self::FLD_SITEURL]
Util::tryIdnToUtf8($this->data[self::FLD_SITEURL])
);
}

Expand Down Expand Up @@ -231,7 +231,10 @@ public function getServerName()
*/
public function setServerName( $serverName )
{
return $this->setData(self::FLD_SERVERNAME, $serverName);
return $this->setData(
self::FLD_SERVERNAME,
Util::tryIdnToAscii($serverName)
);
}

/**
Expand All @@ -243,7 +246,10 @@ public function setServerName( $serverName )
*/
public function setSiteUrlDirect( $siteUrl )
{
return $this->setData(self::FLD_SITEURL, $siteUrl);
return $this->setData(
self::FLD_SITEURL,
Util::tryIdnToAscii($siteUrl)
);
}

/**
Expand Down Expand Up @@ -464,10 +470,11 @@ public function populateDataFromUrl( $url )

$info = parse_url($parseSafeUrl);

$serverName = strtolower($info['host']);
$serverName = Util::tryIdnToAscii($info['host']);

$this->setData(self::FLD_SERVERNAME, $serverName);

$siteUrlTrim = $info['host'];
$siteUrlTrim = $serverName;

if ( isset($info['path']) ) {
$siteUrlTrim .= $info['path'];
Expand All @@ -482,8 +489,8 @@ public function populateDataFromUrl( $url )
$this->setStatus(self::ST_ERR_DOCROOT);
$this->addUserFlagFile(false);

$msg = "{$this->path} - Could not find matching document root for "
. "WP siteurl/servername {$serverName}.";
$msg = "$this->path - Could not find matching document root for "
. "WP siteurl/servername $serverName.";

$this->setCmdStatusAndMsg(UserCommand::EXIT_ERROR, $msg);
Logger::error($msg);
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/AdminGeneral_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/AdminListeners_General_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/AdminListeners_SSL_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/AdminSecurity_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/App_Server_Context.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/App_Server_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/CGI_Context.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/CompilePHP_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/Context_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/ExtApp_Help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_FCGI.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_FCGI_Auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_LB.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_LSAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_PL.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/External_Servlet.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2 class="ls-text-thin">
OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a>
</h2>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 27</h3>
<h3 class="ls-text-muted">Version 1.7 &nbsp;&#8212;&nbsp;Rev. 28</h3>
<hr/>
<div>
<ul>
Expand Down

0 comments on commit ca01927

Please sign in to comment.