Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disclosure of information about sqlite #25

Closed
mcblog opened this issue Aug 4, 2021 · 1 comment
Closed

disclosure of information about sqlite #25

mcblog opened this issue Aug 4, 2021 · 1 comment

Comments

@mcblog
Copy link

mcblog commented Aug 4, 2021

disclosure of information about sqlite

I download this cms and i first install it .

a_20210804164034

index.php:

if( !file_exists('./data/config.php') ) {
	exit('<h3>配置文件不存在,请将站点目录下的config.simple.php复制为data/config.php</h3>');
}
//检查数据库是否存在,不存在则复制数据库
if( !file_exists('./data/onenav.db3') ) {
	copy('db/onenav.simple.db3','data/onenav.db3');
	// copy('db/.htaccess','data/.htaccess');
}

//载入配置文件
require("./data/config.php");

//根据不同的请求载入不同的方法
//如果没有请求控制器
if((!isset($c)) || ($c == '')){
	//载入主页
    include_once("./controller/index.php");
    
}

else{
	include_once("./controller/".$c.'.php');
}

bug code :

if( !file_exists('./data/onenav.db3') ) {
	copy('db/onenav.simple.db3','data/onenav.db3');

then i try to require "./data/onenav.db3" and "/data/.htaccess" http response status 200

it means i can download onenav.db3 and
a0

can gets some privacy information

you can add some random code to document name or sqlite database name .

this cms has many users.

@helloxz
Copy link
Owner

helloxz commented Aug 4, 2021

hello,You can set things up to prevent the database from being downloaded.You can refer to this link: https://www.yuque.com/helloz/onenav/install#ImLOx

@mcblog mcblog closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants