Title: calculateDirSize: quota temp-file prefix skip applies at every recursion level · Issue #311 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: calculateDirSize: quota temp-file prefix skip applies at every recursion level · Issue #311 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: calculateDirSize: quota temp-file prefix skip applies at every recursion level · Issue #311 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Low-priority follow-up from PR #310 review. Context In src/storage/quota.js, calculateDirSize skips any entry whose name starts with .quota.json.tmp. at every recursion level. But saveQuota only ever creates temp files in the pod root (n...
Open Graph Description: Low-priority follow-up from PR #310 review. Context In src/storage/quota.js, calculateDirSize skips any entry whose name starts with .quota.json.tmp. at every recursion level. But saveQuota only ev...
X Description: Low-priority follow-up from PR #310 review. Context In src/storage/quota.js, calculateDirSize skips any entry whose name starts with .quota.json.tmp. at every recursion level. But saveQuota only ev...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/311
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"calculateDirSize: quota temp-file prefix skip applies at every recursion level","articleBody":"Low-priority follow-up from PR #310 review.\n\n## Context\nIn `src/storage/quota.js`, `calculateDirSize` skips any entry whose name starts with `.quota.json.tmp.` at every recursion level. But `saveQuota` only ever creates temp files in the pod root (next to `.quota.json`). Skipping the prefix deep in the tree means a file a user happened to name `.quota.json.tmp.foo` at any depth would be excluded from reconciliation.\n\n## Practical impact\nNarrow — regular PUT quota enforcement uses `sizeDelta` from the request body, not a disk scan. The recursive skip only matters on the reconcile path (corrupt/empty `.quota.json`). Requires a corruption event plus pre-planted files to be exploitable. Still, cleaner to match only at the pod root.\n\n## Suggested fix\nAdd an `isRoot` flag (default `true`) to `calculateDirSize`, pass `false` on recursion, and only apply the `QUOTA_FILE` / `QUOTA_TMP_PREFIX` skips when `isRoot`.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-04-23T02:47:09Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/311"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1397c771-2998-b8ac-1b2b-297e226e3ee2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E540:1316A2:7CFFC1:A58D4C:6B0398D8 |
| html-safe-nonce | d4d392e554fa1ebf51c62105b126dc98fd521f5ff1b716448b15be5e9b140770 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQwOjEzMTZBMjo3Q0ZGQzE6QTU4RDRDOjZCMDM5OEQ4IiwidmlzaXRvcl9pZCI6IjIyMDMwMzE3MzMxNDQ4ODU0NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 24872b37af47285de23ea3207db27922db58f234aa7112af952f63cd593fb4d6 |
| hovercard-subject-tag | issue:4313111245 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/311/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dbfe8cd4b0503e2d4c6c4982862d0a7de1f29370d2d21122afe69228b8c281a5/JavaScriptSolidServer/JavaScriptSolidServer/issues/311 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dbfe8cd4b0503e2d4c6c4982862d0a7de1f29370d2d21122afe69228b8c281a5/JavaScriptSolidServer/JavaScriptSolidServer/issues/311 |
| og:image:alt | Low-priority follow-up from PR #310 review. Context In src/storage/quota.js, calculateDirSize skips any entry whose name starts with .quota.json.tmp. at every recursion level. But saveQuota only ev... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width