Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
helloxz committed Dec 23, 2024
1 parent 5aff02e commit cb066da
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
12 changes: 9 additions & 3 deletions controller/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function check_env() {
//检查PHP版本,需要大于7.0小于8.0
$php_version = floatval(PHP_VERSION);
$uri = $_SERVER["REQUEST_URI"];

// var_dump($uri);

if( ( $php_version < 7 ) || ( $php_version > 8 ) ) {
exit("当前PHP版本{$php_version}不满足要求,需要7.0 <= PHP <= 7.4");
Expand Down Expand Up @@ -41,11 +43,15 @@ function check_env() {
if( file_exists("data/config.php") ) {
exit("配置文件已存在,无需再次初始化!");
}
//检查是否是二级目录
$pattern = '/\/[a-z0-9\/]+$/';
if( preg_match_all($pattern,$uri) ) {
// 路径必须以/或者/index.php开头
if( !preg_match('/^\/|\/index.php/',$uri) ) {
exit("暂不支持二级目录安装!");
}
//检查是否是二级目录
// $pattern = '/\/[a-z0-9\/]+$/';
// if( preg_match_all($pattern,$uri) ) {
// exit("暂不支持二级目录安装!");
// }
return TRUE;
}

Expand Down
3 changes: 3 additions & 0 deletions data/update.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024.12.23
1. 优化禁止二级目录安装检测

2024.12.19
1. 修复default2主题编辑链接导致备用链接丢失问题
2. 新增AI功能及相关API接口:ai_search
Expand Down
2 changes: 1 addition & 1 deletion templates/default2/assets/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion templates/default2/assets/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions templates/default2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "OneNav目前功能最强大的默认主题,推荐使用。",
"homepage": "https:\/\/blog.xiaoz.org",
"help_url":"https://dwz.ovh/gnae4",
"version": "1.2.0",
"update": "2024\/12\/20",
"version": "1.2.4",
"update": "2024\/12\/23",
"author": "xiaoz<[email protected]>",
"screenshot": "https://v.png.pub/imgs/2024/11/27/c01894e5d9e0d850.png",
"demo":"https://nav.rss.ink",
Expand Down

0 comments on commit cb066da

Please sign in to comment.