Skip to content

Commit

Permalink
Check in 1.6.15
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlst committed Aug 5, 2020
1 parent d0495f7 commit 2f239d5
Show file tree
Hide file tree
Showing 281 changed files with 5,131 additions and 2,183 deletions.
2 changes: 1 addition & 1 deletion LSQUICCOMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
583766be5fa2913463179d500f7e25583b273e07
d91deca49872095c51adefdd1455b056262544ca
6 changes: 2 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ prepareLinux()

#other debian OS, we still can
if [ "${OSTYPE}" = "unknowlinux" ] ; then
echo It seems you are not using ubuntu 14,16,18,20 and Debian 7/8/9/10.
echo It seems you are not using ubuntu 14,16,18 and Debian 7/8/9/10.
echo But we still can try to go further.
fi

Expand Down Expand Up @@ -533,9 +533,7 @@ git clone https://github.com/litespeedtech/third-party.git
mv third-party thirdparty
mkdir thirdparty/lib64
cd thirdparty/script/
git pull
#Only for 1.6.14
git reset --hard 41eab3fb08ba59229382e3edf8e0cc5e26d1c03e



sed -i -e "s/unittest-cpp/ /g" ./build_ols.sh
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for openlitespeed 1.6.14.
# Generated by GNU Autoconf 2.69 for openlitespeed 1.6.15.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='openlitespeed'
PACKAGE_TARNAME='openlitespeed'
PACKAGE_VERSION='1.6.14'
PACKAGE_STRING='openlitespeed 1.6.14'
PACKAGE_VERSION='1.6.15'
PACKAGE_STRING='openlitespeed 1.6.15'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL='http://www.litespeedtech.com/'

Expand Down Expand Up @@ -1409,7 +1409,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures openlitespeed 1.6.14 to adapt to many kinds of systems.
\`configure' configures openlitespeed 1.6.15 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1480,7 +1480,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of openlitespeed 1.6.14:";;
short | recursive ) echo "Configuration of openlitespeed 1.6.15:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1641,7 +1641,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
openlitespeed configure 1.6.14
openlitespeed configure 1.6.15
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2315,7 +2315,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by openlitespeed $as_me 1.6.14, which was
It was created by openlitespeed $as_me 1.6.15, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -3181,7 +3181,7 @@ fi

# Define the identity of the package.
PACKAGE='openlitespeed'
VERSION='1.6.14'
VERSION='1.6.15'


# Some tools Automake needs.
Expand Down Expand Up @@ -19624,7 +19624,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by openlitespeed $as_me 1.6.14, which was
This file was extended by openlitespeed $as_me 1.6.15, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -19691,7 +19691,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
openlitespeed config.status 1.6.14
openlitespeed config.status 1.6.15
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ m4_include(ax_check_libudns.m4)
m4_include(ax_check_ip2location.m4)

dnl Process this file with autoconf to produce a configure script.
AC_INIT([openlitespeed],[1.6.14],[[email protected]],[openlitespeed],[http://www.litespeedtech.com/])
AC_INIT([openlitespeed],[1.6.15],[[email protected]],[openlitespeed],[http://www.litespeedtech.com/])
AM_INIT_AUTOMAKE([1.0 foreign no-define subdir-objects])


Expand Down
2 changes: 1 addition & 1 deletion dist/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.14
1.6.15
2 changes: 1 addition & 1 deletion dist/admin/html.open/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<div class="page-footer">
<div class="row">
<div class="col-xs-12 col-sm-6">
<span class="txt-color-white">LiteSpeed WebAdmin Console © 2014-2019 <?php DMsg::EchoUIStr('note_copyrightreserved')?></span>
<span class="txt-color-white">LiteSpeed WebAdmin Console © 2014-2020 <?php DMsg::EchoUIStr('note_copyrightreserved')?></span>
</div>
<div class="col-xs-6 col-sm-6 text-right hidden-xs">
<i class="txt-color-blueLight hidden-mobile"> <i class="fa fa-clock-o"></i>
Expand Down
72 changes: 51 additions & 21 deletions dist/admin/html.open/lib/CValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,22 @@ protected function validatePostTbl($tbl, $extracted)
if ($tid == 'L_GENERAL' || $tid == 'ADM_L_GENERAL') {
return $this->chkPostTbl_L_GENERAL($extracted);
} elseif ($view == 'sl' || $view == 'al') { // will ignore vhlevel
if ($tid == 'LVT_SSL_CERT')
if ($tid == 'LVT_SSL_CERT') {
return $this->chkPostTbl_L_SSL_CERT($extracted);
}
}
elseif ($view == 'admin') {
if ($tid == 'ADM_USR')
if ($tid == 'ADM_USR') {
return $this->chkPostTbl_ADM_USR($extracted);
elseif ($tid == 'ADM_USR_NEW')
}
elseif ($tid == 'ADM_USR_NEW') {
return $this->chkPostTbl_ADM_USR_NEW($extracted);
}
}
elseif ($tid == 'V_UDB') {
return $this->chkPostTbl_ADM_USR_NEW($extracted);
}


return 1;
}

Expand Down Expand Up @@ -180,8 +182,9 @@ protected function chkPostTbl_ADM_USR($d)
$isValid = -1;
}

if ($isValid == -1)
if ($isValid == -1) {
return -1;
}

$newpass = $this->encryptPass($pass);
$d->AddChild(new CNode('passwd', $newpass));
Expand All @@ -200,8 +203,9 @@ protected function chkPostTbl_ADM_USR_NEW($d)
$isValid = -1;
}

if ($isValid == -1)
if ($isValid == -1) {
return -1;
}

$newpass = $this->encryptPass($pass);
$d->AddChild(new CNode('passwd', $newpass));
Expand All @@ -220,11 +224,13 @@ protected function chkPostTbl_L_GENERAL($d)
$nodes = $confdata->GetRootNode()->GetChildren('listener');

foreach ($nodes as $ref => $node) {
if ($ref == $lastref)
if ($ref == $lastref) {
continue;
}
$nodeport = $node->GetChildVal('port');
if ($port != $nodeport)
if ($port != $nodeport) {
continue;
}

$nodeip = $node->GetChildVal('ip');
if ($ip == $nodeip || $ip == 'ANY' || $nodeip == 'ANY') {
Expand All @@ -250,7 +256,7 @@ protected function isCurrentListenerSecure()
protected function chkPostTbl_L_SSL_CERT($d)
{
$isValid = 1;
if ($this->isCurrentListenerSecure($disp)) {
if ($this->isCurrentListenerSecure()) {
$err = 'Value must be set for secured listener. ';
if ($d->GetChildVal('keyFile') == null) {
$d->SetChildErr('keyFile', $err);
Expand Down Expand Up @@ -427,19 +433,34 @@ protected function allow_create($attr, $absname)
return false;
}

protected function test_file(&$absname, &$err, $attr)
protected function get_cleaned_abs_path($attr_minVal, &$path, &$err)
{
if ($attr->_maxVal == null)
return 1; // no permission test
if ($this->get_abs_path($attr_minVal, $path, $err) == 1) {
$absname = $this->clean_absolute_path($path);
return $absname;
}
return null;
}

$absname = PathTool::clean($absname);
if (isset($_SERVER['LS_CHROOT'])) {
protected function clean_absolute_path($abspath)
{
$absname = PathTool::clean($abspath);
if ( isset( $_SERVER['LS_CHROOT'] ) ) {
$root = $_SERVER['LS_CHROOT'];
$len = strlen($root);
if (strncmp($absname, $root, $len) == 0) {
if ( strncmp( $absname, $root, $len ) == 0 ) {
$absname = substr($absname, $len);
}
}
return $absname;
}

protected function test_file(&$absname, &$err, $attr)
{
if ($attr->_maxVal == null)
return 1; // no permission test

$absname = $this->clean_absolute_path($absname);

if ($attr->_type == 'file0') {
if (!file_exists($absname)) {
Expand Down Expand Up @@ -581,7 +602,7 @@ public function chkAttr_file_val($attr, $val, &$err)
return $res;
}

protected function chk_file1($attr, &$path, &$err)
protected function get_abs_path($attr_minVal, &$path, &$err)
{
if (!strlen($path)) {
$err = "Invalid Path.";
Expand All @@ -595,13 +616,13 @@ protected function chk_file1($attr, &$path, &$err)
}

if ($s == '/') {
return $this->test_file($path, $err, $attr);
return 1;
}

if ($attr->_minVal == 1) {
if ($attr_minVal == 1) {
$err = 'only accept absolute path. ';
return -1;
} elseif ($attr->_minVal == 2) {
} elseif ($attr_minVal == 2) {
if (strncasecmp('$SERVER_ROOT', $path, 12) == 0) {
$path = SERVER_ROOT . substr($path, 13);
} elseif ($s == '$') {
Expand All @@ -610,7 +631,7 @@ protected function chk_file1($attr, &$path, &$err)
} else {
$path = SERVER_ROOT . $path; // treat as relative to SERVER_ROOT
}
} elseif ($attr->_minVal == 3) {
} elseif ($attr_minVal == 3) {
if (strncasecmp('$SERVER_ROOT', $path, 12) == 0) {
$path = SERVER_ROOT . substr($path, 13);
} elseif (strncasecmp('$VH_ROOT', $path, 8) == 0) {
Expand All @@ -628,7 +649,16 @@ protected function chk_file1($attr, &$path, &$err)
}
}

return $this->test_file($path, $err, $attr);
return 1;
}

protected function chk_file1($attr, &$path, &$err)
{
$res = $this->get_abs_path($attr->_minVal, $path, $err);
if ($res == 1) {
return $this->test_file($path, $err, $attr);
}
return $res;
}

protected function chkAttr_uri($attr, $node)
Expand Down
4 changes: 2 additions & 2 deletions dist/admin/html.open/lib/DMsg.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function GetSupportedLang(&$cur_lang)

public static function SetLang($lang)
{
if (array_key_exists($lang, self::$_supported)) {
if (PHP_SAPI !== 'cli' && array_key_exists($lang, self::$_supported)) {
$_SESSION[DMsg::_COOKIE_LANG_] = $lang;
self::$_curlang = '';
self::$_curtips = '';
Expand Down Expand Up @@ -267,7 +267,7 @@ public static function Util_SortMsg($lang, $option)
* Please Note: These language files will be overwritten during software updates.
*
* @author LiteSpeed Technoglogies
* @copyright Copyright (c) LiteSpeed 2014-2019
* @copyright Copyright (c) LiteSpeed 2014-2020
* @link https://www.litespeedtech.com/
*/
Expand Down
Loading

0 comments on commit 2f239d5

Please sign in to comment.