v2.6.5 (Lyra): Dynamische pad-resolutie, WordPress-stijl docblocks, security-fix wachtwoord, git-historie schoon

- Bug: dashboard toonde 0 content (AdminPluginAPI::getContentDir() gaf relatief pad terug zonder normalisatie)
- Dynamische pad-resolutie: PluginAPIInterface uitgebreid met getProjectRoot/getContentDir/getPluginsDir/getVersionInfo; CMSAPI en AdminPluginAPI implementeren deze universeel
- public/index.php media-serving gebruikt $config['content_dir'] i.p.v. hardcoded /content
- Navigation en Logs plugins halen paden via de API i.p.v. hardcoded dirname(__DIR__)
- WordPress-stijl docblocks toegevoegd voor alle classes, methods, properties en functies (~450 docblocks, @since 2.6.5)
- Security: hardcoded plaintext-wachtwoord 'admin' verwijderd uit AdminAuth.php; bij eerste installatie wordt een cryptografisch veilig wachtwoord gegenereerd (random_bytes, 16 tekens) en eenmalig op het inlogscherm getoond
- Security: git-geschiedenis schoongemaakt (admin.json, admin.json.example, admin-console/config/admin.json verwijderd uit alle commits; filter-branch over alle branches + tags, gc --prune --aggressive)
- README.md, README.en.md, AGENTS.md bijgewerkt
- Test-scripts bijgewerkt naar clean-URL structuur + actuele ARIA-waarden
- Versie verhoogd naar 2.6.5
- Tests: pentest 29/29, WCAG 25/25, functioneel 16/16, enhanced 25/25
This commit is contained in:
2026-08-27 09:05:51 +00:00
parent 74612aefbb
commit d9ea2eee47
38 changed files with 771 additions and 572 deletions
+14 -14
View File
@@ -65,13 +65,13 @@ echo "1. CORE CMS FUNCTIONALITY TESTS"
echo "-------------------------------"
# Test homepage loads
run_test "Homepage loads" "curl -s '$BASE_URL/' | grep -o '<title>.*</title>'" "Welkom, ik ben Edwin - CodePress"
run_test "Homepage loads" "curl -s '$BASE_URL/' | grep -o '<title>.*</title>'" "<title>Test - CodePress</title>"
# Test guide page loads
run_test "Guide page loads" "curl -s '$BASE_URL/?guide' | grep -o '<title>.*</title>'" "Handleiding - CodePress CMS - CodePress"
run_test "Guide page loads" "curl -s '$BASE_URL/nl/guide' | grep -o '<title>.*</title>'" "<title>Handleiding - CodePress CMS - CodePress</title>"
# Test language switching (currently returns same content)
run_test "Language switching" "curl -s '$BASE_URL/?lang=en' | grep -o '<title>.*</title>'" "Welkom, ik ben Edwin - CodePress"
run_test "Language switching" "curl -s '$BASE_URL/en' | grep -o '<title>.*</title>'" "<title>Test - CodePress</title>"
# Test search functionality
run_test "Search functionality" "curl -s '$BASE_URL/?search=test' | grep -c 'result'" "1"
@@ -81,50 +81,50 @@ echo "2. CONTENT RENDERING TESTS"
echo "--------------------------"
# Test Markdown content (guide page uses Markdown)
run_test "Markdown rendering" "curl -s '$BASE_URL/?guide' | grep -c '<h1>'" "1"
run_test "Markdown rendering" "curl -s '$BASE_URL/nl/guide' | grep -c '<h1'" "1"
# Test 404 handling for non-existent pages
run_test "404 content handling" "curl -s '$BASE_URL/?page=nonexistent' | grep -c '404'" "1"
run_test "404 content handling" "curl -s '$BASE_URL/nl/nonexistent' | grep -c '404'" "1"
echo ""
echo "3. NAVIGATION TESTS"
echo "-------------------"
# Test menu generation
run_test "Menu generation" "curl -s '$BASE_URL/' | grep -c 'nav-item'" "2"
run_test "Menu generation" "curl -s '$BASE_URL/nl' | grep -c 'nav-item'" "2"
# Test breadcrumb navigation
run_test "Breadcrumb navigation" "curl -s '$BASE_URL/?guide' | grep -c 'breadcrumb'" "1"
run_test "Breadcrumb navigation" "curl -s '$BASE_URL/nl/guide' | grep -c 'breadcrumb'" "2"
echo ""
echo "4. TEMPLATE SYSTEM TESTS"
echo "------------------------"
# Test template variables (site_title should be replaced)
run_test "Template variables" "curl -s '$BASE_URL/' | grep -c 'CodePress'" "7"
run_test "Template variables" "curl -s '$BASE_URL/nl' | grep -c 'CodePress'" "7"
# Test guide template variables (should NOT be replaced)
run_test "Guide template variables" "curl -s '$BASE_URL/?guide' | grep -o '\{\{site_title\}\}' | wc -l" "0"
run_test "Guide template variables" "curl -s '$BASE_URL/nl/guide' | grep -o '\{\{site_title\}\}' | wc -l" "0"
echo ""
echo "5. PLUGIN SYSTEM TESTS (NEW v1.5.0)"
echo "-----------------------------------"
# Test plugin system (check if plugins directory exists and is loaded)
run_test "Plugin system" "curl -s '$BASE_URL/' | grep -c 'sidebar'" "1"
run_test "Plugin system" "curl -s '$BASE_URL/nl' | grep -c 'sidebar'" "1"
echo ""
echo "6. SECURITY TESTS"
echo "-----------------"
# Test XSS protection (1 script tag found but safely escaped)
run_test "XSS protection" "curl -s '$BASE_URL/?page=<script>alert(1)</script>' | grep -c '<script>'" "1"
# Test XSS protection (script tag should be blocked/escaped — 0 raw script tags)
run_test "XSS protection" "curl -s '$BASE_URL/nl/%3Cscript%3Ealert(1)%3C/script%3E' | grep -c '<script>'" "0"
# Test path traversal protection (returns 404 instead of 403)
run_test "Path traversal" "curl -s '$BASE_URL/?page=../../../etc/passwd' | grep -c '404'" "1"
# Test 404 handling
run_test "404 handling" "curl -s '$BASE_URL/?page=nonexistent' | grep -c '404'" "1"
run_test "404 handling" "curl -s '$BASE_URL/nl/nonexistent' | grep -c '404'" "1"
echo ""
echo "7. PERFORMANCE TESTS"
@@ -150,7 +150,7 @@ echo "8. MOBILE RESPONSIVENESS TESTS"
echo "-------------------------------"
# Test mobile user agent
run_test "Mobile responsiveness" "curl -s -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)' '$BASE_URL/' | grep -c 'viewport'" "1"
run_test "Mobile responsiveness" "curl -s -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)' '$BASE_URL/nl' | grep -c 'viewport'" "1"
echo ""
echo "=========================================="