odstranene podmienky na document root

This commit is contained in:
2026-11-06 10:25:29 +01:00
parent a9022e1fb2
commit b92aedb7d8
4 changed files with 49 additions and 31 deletions
+2 -2
View File
@@ -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.