Commit Graph
132 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
v2.6.0
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
v2.5.1
2026-08-10 15:36:29 +02:00
E.Noorlander 0961b23b8d merge from development 2026-08-08 18:45:10 +02:00
E.Noorlander 3dffc82f1e Fix version fallback: use 0.0.0 with error flag when version.php is missing or invalid
- handleUpdate(): set versionError flag and return 0.0.0 if version.php missing/invalid
- Dashboard stats: use 0.0.0 fallback instead of '-' when version cannot be determined
- Makes version.php truly required as intended
2026-08-08 18:37:26 +02:00
E.Noorlander 68db5fe7b2 Bump version to 2.0.0 - Major release with new theme engine and security fixes 2026-08-08 18:30:27 +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 cc0e4c19c8 Fix PHP parse error in version.php: apostrophe in single-quoted string caused HTTP 500 2026-07-29 16:30:31 +02:00
E.Noorlander 5ab18c7b46 v1.9.2: Admin sidebar groepen, IP-uitsluitingen, guides herschreven v1.9.2 2026-07-29 16:08:04 +02:00
E.Noorlander 92d782e6c5 Voeg IP-uitsluitingen toe aan configuratie: IP's niet meetellen in statistieken en overslaan bij beveiliging 2026-07-29 16:01: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
v1.9.1
2026-07-29 15:53:35 +02:00
E.Noorlander 5357bc8915 CodePress CMS v1.9.0: visitor statistics with SVG world map and GeoIP
- Add GeoIP class with provider chain: local DB-IP Lite, MaxMind .mmdb, external API
- Add built-in pure-PHP MMDBReader so .mmdb works without Composer
- Add cli/geoip-update.php to download DB-IP Lite and build a compact binary index
- Add cli/generate-world-map.php to generate the world map SVG from Natural Earth TopoJSON
- Add Analytics class aggregating stats in admin/storage/stats.json with LOCK_EX
- Add admin statistics page with choropleth world map, country list, top pages,
  daily chart, referrers and a period filter
- Add GeoIP and privacy settings with database update and stats reset buttons
- Add optional IP anonymization and configurable retention period
- Add country field to requests.log (parser accepts 7, 8 or 9 fields)
- Add country column to request log and KPI cards to the dashboard
- Ignore GeoIP binaries and stats.json in Git
- Update TODO.md, guides and version to 1.9.0
2026-07-29 15:40:02 +02:00
E.Noorlander a795307664 Add Git repository permission check to Admin Update page 2026-07-29 14:33:35 +02:00
E.Noorlander 2ea22b392a Ignore admin/storage/cache/ runtime directory 2026-07-29 14:31:02 +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 62dd7ddb9c Add system update feature, git-ignore local configs, and fix homepage request logging
- Exclude config.json and admin.json in .gitignore so live settings/passwords are never overwritten by git
- Auto-generate config.json and admin.json with defaults if missing
- Add config.json.example and admin.json.example reference templates
- Add System Update page (/admin/update) in Admin Console to pull updates via Git with 1 click
- Log effective page name in index.php instead of literal 'auto'
- Add extra HAProxy/PFSense proxy headers to RequestLogger::getClientIp()
2026-07-28 17:26:34 +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 bcbb297116 Nieuwste pagina-optie toegevoegd aan startpagina config 2026-07-28 16:37:10 +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 a380025a2b Show CMS version text in footer, enable version display 2026-07-28 15:11:21 +02:00
E.Noorlander 9fc26266cd Add request log to dashboard, update guides with logging docs 2026-07-28 14:59:18 +02:00
E.Noorlander 35f502ad93 Fix RequestLoader autoload + trim bot list 2026-07-28 14:53:41 +02:00
E.Noorlander e51305b200 Add request logging, bot blocking, and admin log viewer 2026-07-28 14:51:55 +02:00
E.Noorlander c8343a096e Show CodePress version and OS in admin site info 2026-07-28 14:47:49 +02:00
E.Noorlander 3bb16ff116 Add docblocks to ContentAPI and handleGuide 2026-07-28 14:40:55 +02:00
E.Noorlander 890510c4c6 Bump version to 1.7.0
- Version 1.7.0 'API' with Content API, admin guide page, anchor link fixes, code block styling
2026-07-28 14:37:52 +02:00
E.Noorlander c1406f8828 Fix guide deep links, code block styling
- Move heading IDs from hidden permalink anchors to parent headings so deep links scroll correctly (admin.php)
- Change code block background from dark to light gray (guide.php)
- Add pre/code CSS to frontend layout.mustache for visible code blocks
2026-07-28 14:37:14 +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 d89236d7a5 Fix admin guide: laad Composer autoloader voor CommonMark markdown render 2026-07-28 14:10:35 +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 e85f6e91e1 Vervang raw JSON config editor door instellingenformulier met default_page dropdown
- Admin config pagina is nu een formulier met secties voor algemeen, taal,
  SEO, auteur en features
- Startpagina instelbaar via dropdown met beschikbare pagina's uit content/
- Handleiding (nl/en) bijgewerkt met nieuwe configuratie-instructies
2026-07-28 13:49:33 +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 52e1ce0b20 Fix admin form actions and redirects: replace & with ? for query parameters 2026-07-21 12:45:58 +02:00
E.Noorlander 41cbaf8be9 Fix version number in project structure code block in guides 2026-07-14 15:42:25 +02:00
E.Noorlander dacc439b1b Update version to 1.6.0 and refresh guides with clean URLs 2026-07-14 15:39:34 +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 3d397b38b4 Fix public/.htaccess: php uit FilesMatch (blokkeerde alle php inclusief index.php) 2026-07-14 14:55:24 +02:00
E.Noorlander 9870697df9 Fix public/.htaccess: verwijder <Directory> blok (niet toegestaan in .htaccess) 2026-07-14 14:46:42 +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 4d2e11e419 Bump version to 1.6.0, update docs and guides to match current project state
- version.php: 1.5.0 → 1.6.0 + changelog for media browser, editor,
  theme management, content move/rename, /-media/ prefix
- README.md/README.en.md: complete rewrite with current project structure,
  config format, admin features, CodeMirror, themes, quick start
- guide/nl.codepress.md, guide/en.codepress.md: comprehensive update
  matching all current admin routes, features, and project layout
- TODO.md: compiled from docs/TODO.md with completed/future items
2026-06-24 17:15:14 +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
E.Noorlander b0eff6a742 Merge development into main - Admin console, security fixes, sidebar toggle
# Conflicts:
#	engine/templates/layout.mustache
#	public/assets/js/app.js
2026-02-16 17:16:01 +01:00
E.Noorlander 9f766d8296 Update TODO.md with admin features roadmap and AGENTS.md with current project state
TODO.md: Add Markdown editor, plugin enable/disable, plugin API,
file uploads, map management, activity log, and more admin features.
Remove resolved items (extract/AuthController/CSRF - replaced by new admin).
AGENTS.md: Document full project structure including admin-console,
add AI model info (claude-opus-4-6), admin routing, security practices.
2026-02-16 17:12:45 +01:00