diff --git a/AGENTS.md b/AGENTS.md index d8b4e7e..cc50343 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ When a `.md` file is requested, `src/md2html.php` loads the Markdown, converts i ## Environment Assumptions - NGINX supplies the original request URI and the site document root via FastCGI. - The project can live outside the document root. PHP embeds local CSS/JS into HTML; no static asset URLs are required. -- An external symlink requires an explicitly configured URL prefix and target directory. See README.md. +- External symlinks and junctions work without per-prefix configuration, subject to PHP filesystem access. ## Change Priorities 1. Keep output readable on desktop and mobile. @@ -40,7 +40,7 @@ When a `.md` file is requested, `src/md2html.php` loads the Markdown, converts i - Do not assign anonymous functions or closures to PHP variables; use named functions or class methods. - Output helpers should return rendered content for callers to consume. - Validate the decoded URL path, including the `.md` extension, before filesystem lookup. Query parameters must never select a file. -- Require a regular Markdown file whose canonical path lies under the canonical document root or the explicitly permitted root for the requested URL prefix. +- Require a regular Markdown file after canonical resolution; symlink and junction targets may lie outside the document root. - Keep path handling compatible with Linux and Windows, including symlink and junction resolution. - Keep Parsedown raw HTML rendering enabled. Serve Markdown from trusted sources. diff --git a/README.md b/README.md index 2793df5..18a1fc7 100644 --- a/README.md +++ b/README.md @@ -20,42 +20,64 @@ Projekt môže byť mimo webového koreňa. Nasadzuj `src/` aj `vendor/`; autolo - `src/markdown.css`: štýly, ktoré PHP vloží priamo do `