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
+13 -13
View File
@@ -8,7 +8,7 @@
* controles uit, registreert analytics- en logvermeldingen en render
* uiteindelijk de pagina via CodePressCMS::render().
*
* @since 2.6.4
* @since 2.6.5
* @package CodePress
*/
require_once __DIR__ . '/../cms/core/index.php';
@@ -18,7 +18,7 @@ $config = include __DIR__ . '/../cms/core/config.php';
/**
* Log-systeem initialiseren op basis van de logging-configuratie.
*
* @since 2.6.4
* @since 2.6.5
*/
// Initialize dynamic logging
LogManager::init($config['logging'] ?? []);
@@ -26,7 +26,7 @@ LogManager::init($config['logging'] ?? []);
/**
* Security headers instellen voor alle front-end responses.
*
* @since 2.6.4
* @since 2.6.5
*/
// Security headers
header('X-Content-Type-Options: nosniff');
@@ -43,7 +43,7 @@ header_remove('X-Powered-By');
* content-map dynamisch op basis van config['content_dir'] en serveert
* bestanden buiten public/ met een pad-controle om traversal te blokkeren.
*
* @since 2.6.4
* @since 2.6.5
*/
// Serve media files from any content/ subdirectory via /-media/
// Serve files from content/-assets/ via /-assets/ (backward compatible)
@@ -88,7 +88,7 @@ if (strpos($path, '/-media/') === 0) {
* /-assets/ route: serveert bestanden uit content/-assets/ of de content-
* root, met backward-compatibiliteit en path-traversal-controle.
*
* @since 2.6.4
* @since 2.6.5
*/
if (strpos($path, '/-assets/') === 0) {
$relative = ltrim(substr($path, 8), '/');
@@ -136,7 +136,7 @@ if ($path === '/robots.txt') {
*
* Voorkomt dat ruwe content-bestanden via het web opgevraagd worden.
*
* @since 2.6.4
* @since 2.6.5
*/
// Block direct access to content files
if (strpos($path, '/content/') === 0) {
@@ -153,7 +153,7 @@ if (strpos($path, '/content/') === 0) {
* slaan de controles over. Het requestStatus wordt bijgehouden voor
* latere logging en blocking.
*
* @since 2.6.4
* @since 2.6.5
*/
// Load RequestLogger for IP & request logging
require_once __DIR__ . '/../cms/core/class/RequestLogger.php';
@@ -208,7 +208,7 @@ if (!$isAllowedIp) {
/**
* CMS-instantie aanmaken met de geladen configuratie.
*
* @since 2.6.4
* @since 2.6.5
*/
// Instantiate CMS instance
$cms = new CodePressCMS($config);
@@ -219,7 +219,7 @@ $cms = new CodePressCMS($config);
* Land, IP-anonimisatie en analytics-instellingen worden bepaald op basis
* van de analytics-configuratie.
*
* @since 2.6.4
* @since 2.6.5
*/
// Analytics & GeoIP settings
$analyticsSettings = $config['analytics'] ?? [];
@@ -232,7 +232,7 @@ if (!empty($analyticsSettings['enabled'])) {
/**
* IP-anonimisatie toepassen voor opslag indien ingeschakeld.
*
* @since 2.6.4
* @since 2.6.5
*/
// Apply IP anonymization for storage if enabled
$storedIp = !empty($analyticsSettings['anonymize_ip'])
@@ -246,7 +246,7 @@ $storedIp = !empty($analyticsSettings['anonymize_ip'])
* een request-logregel, vuurt een LogManager-requestevent en registreert
* geaggregeerde analytics (mits ingeschakeld en IP niet uitgesloten).
*
* @since 2.6.4
* @since 2.6.5
*/
// Log page view (not for media/assets)
if (!str_starts_with($path, '/-media/') && !str_starts_with($path, '/-assets/')) {
@@ -291,7 +291,7 @@ if (!str_starts_with($path, '/-media/') && !str_starts_with($path, '/-assets/'))
*
* Geeft 429 bij rate-limit en 403 bij andere blokkades, met noindex-headers.
*
* @since 2.6.4
* @since 2.6.5
*/
// Block request if status is not ok
if ($requestStatus !== 'ok') {
@@ -309,6 +309,6 @@ if ($requestStatus !== 'ok') {
/**
* Pagina renderen via de CodePressCMS-instantie.
*
* @since 2.6.4
* @since 2.6.5
*/
$cms->render();