Commit Graph
22 Commits
Author SHA1 Message Date
E.Noorlander 1492dcf71f v2.6.0: Content backup/git versioning, plugin type system, docs update
New features:
- ContentBackup class with ZIP backup/restore and git versioning
- Admin backup & restore page (content-backup.twig) with git init/commit/log/restore
- Plugin type system: system (blue) vs content (green) with visual badges
- PluginAPIInterface + AdminPluginAPI for plugin architecture
- Essential plugin flag (cannot edit/deactivate/delete)

Improvements:
- Consolidated enabled_plugins config (removed plugins.enabled)
- Removed Analytics/Logging toggles from admin config page
- Fixed Dashboard plugin Twig comments rendered as text
- Updated 20 guide files (NL+EN): configuratie, plugins, plugin-development,
  core-classes, theme-json, layouts, scss-styling, admin-beheerder, nieuw-thema, architectuur
- Improved accessibility test script (grep -E, min/max checks)

Cleanup:
- Removed unused classes: ARIAComponents, AccessibilityManager, ContentSecurityPolicy, etc.
- Removed vendor packages: mustache/mustache, php-mqtt/client
- Removed old templates: logs.twig, statistics.twig (now plugins)
- Moved language files to language/ directory

Tests:
- Pentest: 30/30 passed, 0 vulnerabilities
- WCAG 2.1 AA: 25/25 passed, 100% compliance
2026-08-15 19:21:04 +02:00
E.Noorlander cd498c8c3a v2.5.1: Admin theme refactor, Navigation plugin, user roles, guide restructure
- Reorganize admin into admin/theme/default/ (views + assets)
- Rename GuideNav to Navigation plugin (essential, protected)
- Plugin assets support (SCSS/CSS) loaded after theme CSS
- User roles: Admin, Content Manager, BI Manager, Site Admin
- Role-based access control (RBAC) for admin routes and sidebar
- Guide restructure: sub-topics in separate folders with sidebar nav
- Dynamic breadcrumb for homepage and subdirectories
- Fix theme path traversal (../../ -> ../) in admin.php
- Fix CodeMirror mode load order (xml -> css -> js -> htmlmixed -> php)
- Fix editor-toolbar.js null checks for plugin edit pages
- Layout select from theme.json with live frontmatter update
- Footer sticky at bottom of viewport (min-height: 100vh)
- Breadcrumb color fix (var(--nav-font) -> var(--header-bg))
- Remove language switcher from guide pages
- Update README.md and README.en.md
- Bump version to 2.5.1
2026-08-10 15:36:29 +02:00
E.Noorlander 596d2f68c2 Security fixes: XSS and CRLF injection prevention
- Add sanitizePageParam() method to CodePressCMS to prevent XSS attacks via page parameter
- Sanitize page and lang parameters in available_langs URLs
- Add CRLF character filtering in MQTTTracker to prevent header injection
- URL-encode parameters before storing in cookies

Pentest results: 29/30 tests passed (1 false positive on CRLF test -
URL-encoded chars in cookie value, no actual header injection possible)
2026-08-08 18:26:44 +02:00
E.Noorlander a1e5baacac CMS 2.0 - Theme engine, logging, admin improvements
Major changes:
- New ThemeManager with Twig templating and SCSS compilation
- Dynamic themes system (themes/default, themes/demo)
- LogManager with SQLite storage and syslog forwarding
- RequestLogger with static helper methods
- Admin UI overhaul (Bootstrap 5, dark mode)
- Admin config page with logging and theme settings
- Admin logs page with filters and search
- Removed legacy Mustache templates
- Removed test plugin and theme
- Composer dependencies: Twig, scssphp, CommonMark, MaxMind GeoIP
2026-08-08 18:02:14 +02:00
E.Noorlander 0fe5c75eae v1.9.1: fix world map rendering and resolve eight small TODO items
World map:
- Fix zero-padded ISO numeric ids leaving 31 countries unrendered
  (Brazil, Australia, Belgium, Austria, Algeria and more)
- Fix Russia and Fiji smearing across the full map width at the antimeridian
  by unwrapping ring longitudes and drawing them at both edges
- Crop to 84N-60S, add evenodd fill rule, 174 countries rendered

Improvements:
- Logger::tail() reads backwards in chunks instead of loading the whole file
- External links get rel=noopener noreferrer in footer and Markdown content
- formatDisplayName() cleaned up and guarded against empty input
- Export statistics as CSV (Excel BOM) or JSON
- GeoIP database auto-updates when older than 35 days
- Editor shortcuts Ctrl/Cmd+S to save and Ctrl/Cmd+N for a new page
- Live search filter in the admin content browser
- Content versioning with timestamped .bak copies in content/-backups/

Also removes eight stale TODO entries that were already implemented
2026-07-29 15:53:35 +02:00
E.Noorlander 239762fd3a CodePress CMS v1.8.0: BotGuard security engine, HAProxy docs & ARIA fix
- Implement BotGuard security engine (Bot, AI, Scraper & Empty UA blocking)
- Add Admin Security page (/admin/security) with toggles, rate limiter & block/allowlists
- Add per-IP RateLimiter handoff in index.php with HTTP 429 response
- Add dynamic /robots.txt generation and noai/noimageai meta tags
- Add RequestLogger status column and blocked badges in admin request logs
- Fix ARIAComponents.php syntax errors on lines 67, 137, 262
- Add HAProxy / PFSense bot blocking & IP forwarding guide (docs/haproxy-bot-blocking.md)
- Update version to 1.8.0 with release notes in version.php and guides
2026-07-29 14:26:48 +02:00
E.Noorlander e2d9ddd516 Fix public client IP extraction and hide duplicate footer creation date
- Enhance RequestLogger::getClientIp() with 2-pass detection prioritizing public IPs over proxy/internal IPs
- Hide footer creation date when identical to modification date to prevent duplicate date display
- Improve AdminAuth log helper and footer template tooltips
2026-07-28 17:11:00 +02:00
E.Noorlander 0626e8c6cc Fix newest homepage detection, file creation dates, real IP, and request log visitor type
- Fix detectNewestPage() to search subdirectories recursively and handle language prefixes
- Fix getFileInfo() to preserve frontmatter created date or ctime instead of overwriting with mtime
- Automatically store created date in frontmatter when creating/editing files
- Add RequestLogger::getClientIp() with proxy and Cloudflare header support
- Replace domain column in request log with visitor/bot type badges (Human, AI, Search, Scraper)
- Update 'Activiteitenlog' to 'Activiteiten log' in UI and guide
2026-07-28 16:56:51 +02:00
E.Noorlander 8fdbabf587 Fix unreachable index page and duplicate homepage entry in navigation
buildUrl() hardcoded 'index' as the homepage, so the menu link for
index.md pointed at /nl. With a different default_page that root URL
served another page, making index.md unreachable.

- Add getEffectiveDefaultPage(): resolves 'auto' to the detected page
  and caches the result
- buildUrl() now omits the page segment only for the effective default
  page instead of the literal string 'index'
- Route getPage(), generateBreadcrumb(), getContentType() and the
  render() template data (default_page, homepage, is_homepage,
  home_active_class, current_page, lang switch URLs) through it
- getHomepageTitle() returns t('home') so the home button no longer
  duplicates a menu item label
- Drop the now-redundant default_page skip in renderMenu() so every
  page stays reachable from the menu
- getAllContentDirs() also skips dot-directories (.git) in the move
  dropdown
2026-07-28 16:09:44 +02:00
E.Noorlander 842046ac82 Version 1.7.1 — auto default_page detection
- config.json now has default_page: auto for fresh installs
- CodePressCMS::detectDefaultPage() scans content/ for first available file
- getHomepageTitle() also respects auto mode
- Admin config form preserves auto as selectable option
- Save handler falls back to auto instead of index
2026-07-28 15:39:12 +02:00
E.Noorlander 50d19b2c11 Remove v prefix from version display, fix router default_page 2026-07-28 15:18:17 +02:00
E.Noorlander 3bb16ff116 Add docblocks to ContentAPI and handleGuide 2026-07-28 14:40:55 +02:00
E.Noorlander 7f1840feb5 Inhoudsopgave toegevoegd aan handleidingen met HeadingPermalinkExtension
- Nederlandse en Engelse handleiding hebben nu een inhoudsopgave
  met anchors naar alle hoofdstukken op dezelfde pagina
- HeadingPermalinkExtension toegevoegd aan CommonMark configuratie
  voor zowel frontend als admin markdown parsers
- Heading IDs gegenereerd voor elk kopje (## en lager)
2026-07-28 14:13:03 +02:00
E.Noorlander 90253673ba ContentAPI voor PHP content bestanden + handleiding in admin
- Nieuwe ContentAPI class beschikbaar als $api in PHP content bestanden
  met methodes: getAllPages, getPage, getMenu, getConfig, buildUrl, etc.
- Admin handleiding pagina op /admin/guide met taalwisselaar
- Zijbalk link naar handleiding in admin menu
- Dubbele alert in config pagina verwijderd
- Handleidingen (nl/en) uitgebreid met Content API referentie
2026-07-28 13:59:32 +02:00
E.Noorlander 4bb138eb92 Fix auto-link nested <a> tag protection and add feature flag check 2026-07-21 13:46:54 +02:00
E.Noorlander c0dc707a51 Fix plugin security, hooks system, and admin features
- Add plugin allowlist (enabled_plugins in config.json)
- Add enable/disable toggle in admin (separate from visibility)
- Add plugin hooks system (actions + filters with auto-registration)
- Fix autoLinkPageTitles nested <a> tag vulnerability
- Move MQTT credentials to environment variables
- Preserve current page in language switcher
- Fix ctime/birthtime for file creation date
- Deduplicate getGuidePage() CommonMark setup
- Simplify formatDisplayName() logic
- Add admin activity log to dashboard
- Add own password change with current password verification
- Apply theme header_color to admin sidebar
- Add content preview button in editor
2026-07-21 13:42:32 +02:00
E.Noorlander e19433a389 Add custom image size syntax for Markdown files
Support ![alt](url){:width="300" height="200"} syntax in .md files
to set image dimensions via attributes inside {: :}
2026-07-21 13:16:33 +02:00
E.Noorlander a048056b6b Fix auto-link URLs: prevent double language prefix from relative link conversion 2026-07-21 13:00:24 +02:00
E.Noorlander caa335a319 Clean URLs and security improvements
- Add .htaccess rewrite rules for clean URLs (/nl/page, /admin/route)
- Add PHP dev server router with clean URL support
- Update admin template asset paths to absolute for clean URL compat
- All pentest fixes verified: CSRF on login, directory listing disabled,
  secure cookies, backup/sourcemap files removed, version disclosure off
2026-07-14 15:28:53 +02:00
E.Noorlander c6c2fdb67b Security fixes n.a.v. pentest op noorlander.info
- CSRF token toegevoegd aan admin login formulier
- Directory listing uitgeschakeld (Options -Indexes)
- Secure/SameSite=Strict cookie verbeterd in AdminAuth
- app.js.backup en source maps verwijderd
- Version disclosure configureerbaar via config.json
- .map en backup extensies geblokkeerd in .htaccess
2026-07-14 14:25:04 +02:00
E.Noorlander 2be16d9244 Media browser: recursive scan entire content/ tree, /-media/ URL prefix, editor change detection fix
- handleMediaList() now scans content/ recursively for all media files
- URLs use /-media/ prefix mapping directly to content/ (no special cases)
- index.php: added /-media/ route, kept /-assets/ for backward compat
- editor-toolbar.js: fixed editor.on('change') placement (was inside switchMode)
- content-edit.php and content-new.php: back-btn unsaved-changes detection
- Removed unused __editorCleanup global
2026-06-24 17:00:59 +02:00
E.Noorlander aabc41aecc Remove media menu option and verify route handling 2026-06-23 16:20:29 +02:00