-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: SQLite3 database file created in /public folder #3113
Comments
You can change the location of the file using the |
@lonnieezell the problem is not being able to change the location of the file, but rather the default path being the public folder. This is a undocumented behavior and can add a security flaw on applications that use CodeIgniter, not every developer is going to check where is the database is going to be write. If a framework offers me sqlite support, i would expect that it will take some measures to protect the file from being leaked on the internet. |
That's a fair point. And I guess it is default behavior inherited from CI3. I don't recall it having ever been changed, honestly. We should set the default location in the Thanks. |
I think the directory can be named "writable/data" |
Cross-referencing my opinion: #3151 (comment) |
Describe the bug
When using database with SQLite3 as DBDriver parameter, the database file is created in the /public application folder.
CodeIgniter 4 version
4.0.3
Steps to reproduce
Expected behavior
Database files can contain private information and should not be created in the public folder by default.
Context
The text was updated successfully, but these errors were encountered: