mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 11:39:18 +02:00
refactor: rename database → storage
More semantically accurate: contains SQLite files, schema, fixtures, test data. Updated all references in code, scripts, docs.
This commit is contained in:
@@ -66,7 +66,7 @@ posterg-website/
|
||||
|
||||
**Before:**
|
||||
- ❌ All files in DocumentRoot (/var/www/html/)
|
||||
- ❌ Database accessible at /database/test.db
|
||||
- ❌ Database accessible at /storage/test.db
|
||||
- ❌ Config files accessible
|
||||
- ❌ Dev server exposed everything
|
||||
- ❌ Relied on nginx deny rules
|
||||
@@ -88,18 +88,18 @@ just serve
|
||||
# Test in browser:
|
||||
# - http://localhost:8000/ → Should work
|
||||
# - http://localhost:8000/admin/ → Should work
|
||||
# - http://localhost:8000/database/test.db → Should 404 ✅
|
||||
# - http://localhost:8000/storage/test.db → Should 404 ✅
|
||||
# - http://localhost:8000/config/ → Should 404 ✅
|
||||
# - http://localhost:8000/../database/test.db → Should 404 ✅
|
||||
# - http://localhost:8000/../storage/test.db → Should 404 ✅
|
||||
```
|
||||
|
||||
### Security Verification
|
||||
```bash
|
||||
# These should all return 404:
|
||||
curl http://localhost:8000/database/test.db
|
||||
curl http://localhost:8000/storage/test.db
|
||||
curl http://localhost:8000/config/bootstrap.php
|
||||
curl http://localhost:8000/vendor/autoload.php
|
||||
curl http://localhost:8000/../database/test.db
|
||||
curl http://localhost:8000/../storage/test.db
|
||||
curl http://localhost:8000/lib/Database.php
|
||||
```
|
||||
|
||||
@@ -138,7 +138,7 @@ curl http://localhost:8000/lib/Database.php
|
||||
just server-status
|
||||
curl -I https://posterg.erg.be/
|
||||
curl -I https://posterg.erg.be/admin/
|
||||
curl -I https://posterg.erg.be/database/test.db # Must 404!
|
||||
curl -I https://posterg.erg.be/storage/test.db # Must 404!
|
||||
```
|
||||
|
||||
## 📝 Path Reference
|
||||
@@ -164,7 +164,7 @@ require_once LIB_ROOT . '/Database.php'; // Library
|
||||
- `PUBLIC_ROOT` - /path/to/posterg-website/public
|
||||
- `CONFIG_ROOT` - /path/to/posterg-website/config
|
||||
- `DATABASE_ROOT` - /path/to/posterg-website/database
|
||||
- `DATABASE_PATH` - /path/to/posterg-website/database/test.db
|
||||
- `DATABASE_PATH` - /path/to/posterg-website/storage/test.db
|
||||
- `RESOURCES_ROOT` - /path/to/posterg-website/resources
|
||||
- `LIB_ROOT` - /path/to/posterg-website/lib
|
||||
- `VAR_ROOT` - /path/to/posterg-website/var
|
||||
|
||||
Reference in New Issue
Block a user