atris 3.72.1 → 3.72.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/site.js +2 -0
  2. package/package.json +1 -1
package/lib/site.js CHANGED
@@ -103,6 +103,8 @@ function serveSite(dir, port = 4321) {
103
103
  let rel;
104
104
  try { rel = decodeURIComponent((req.url || '/').split('?')[0]); }
105
105
  catch { res.writeHead(400); res.end('bad request'); return; }
106
+ // A null byte makes the fs calls below throw synchronously and crash the server.
107
+ if (rel.includes('\0')) { res.writeHead(400); res.end('bad request'); return; }
106
108
  if (rel.endsWith('/')) rel += 'index.html';
107
109
  const file = path.normalize(path.join(root, rel));
108
110
  // compare against root + separator so a sibling like "site-evil" can't pass for "site"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "3.72.1",
3
+ "version": "3.72.2",
4
4
  "description": "you say what you want in plain words. atris builds it, checks it, and shows you proof.",
5
5
  "main": "bin/atris.js",
6
6
  "bin": {