Title: Potential DoS attack when reading large containers · Issue #332 · CommunitySolidServer/CommunitySolidServer · GitHub
Open Graph Title: Potential DoS attack when reading large containers · Issue #332 · CommunitySolidServer/CommunitySolidServer
X Title: Potential DoS attack when reading large containers · Issue #332 · CommunitySolidServer/CommunitySolidServer
Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). The server seems to be unable to reply to requests to this container (files within it work fine). The server also doesn't appear to give...
Open Graph Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). The server seems to be unable to reply to requests to this container (files within it work fine)...
X Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). The server seems to be unable to reply to requests to this container (files within it work f...
Opengraph URL: https://github.com/CommunitySolidServer/CommunitySolidServer/issues/332
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Potential DoS attack when reading large containers","articleBody":"I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file).\r\nThe server seems to be unable to reply to requests to this container (files within it work fine).\r\nThe server also doesn't appear to give an error, or result in a timeout.\r\n\r\nI've done some profiling in [`FileDataAccessor`](https://github.com/solid/community-server/blob/master/src/storage/accessors/FileDataAccessor.ts#L285-L319), and these are my findings:\r\n\r\n* `fsPromises.readdir` takes 541 ms. Given the number of files, this is a reasonable duration.\r\n* The for loop for generating metadata takes 28.045 s. This can probably be optimized. Maybe some parallelization can be done even using `Promise.all`.\r\n* Quad generation takes 1.187 s. Relatively fast, but maybe also optimizable if done in a streaming manner.\r\n* **After this, I see `warn: This writer can only write errors` appearing in the console, and nothing happens anymore after that. Possibly something crashes silently, as I'm unable to see any further output (and my request is still hanging).**\r\n\r\n-----\r\n\r\nOne could argue that this container is simply too large, so perhaps the server should have a default max limit when listing containers. Alternatively, container listing can be done in a streaming manner, which would probably require refactoring a bunch of components.\r\n","author":{"url":"https://github.com/rubensworks","@type":"Person","name":"rubensworks"},"datePublished":"2020-11-18T13:04:12Z","url":"https://github.com/CommunitySolidServer/CommunitySolidServer/issues/332"}
| 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:2785ac4b-9918-d7e5-cf38-9b225cde350e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F0A:3AAB66:9B5CDD:D39088:6B03F244 |
| html-safe-nonce | 4ea330a20ad148ece5c2719dfa168417511c82e234f160af09dc0320ae45c511 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjBBOjNBQUI2Njo5QjVDREQ6RDM5MDg4OjZCMDNGMjQ0IiwidmlzaXRvcl9pZCI6IjQwOTE4NDU3NDQ0NzMxNDE4MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0783d051bed104aaa2ef36f3d0ac3a3c4f307be4c7ff9e32fd671257e761042d |
| hovercard-subject-tag | issue:745641749 |
| 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/CommunitySolidServer/CommunitySolidServer/332/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bee5c6a0b5f635733017c58c5d634008eed3b28b6751c3c8e92ff52ff92c0ee8/CommunitySolidServer/CommunitySolidServer/issues/332 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bee5c6a0b5f635733017c58c5d634008eed3b28b6751c3c8e92ff52ff92c0ee8/CommunitySolidServer/CommunitySolidServer/issues/332 |
| og:image:alt | I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). The server seems to be unable to reply to requests to this container (files within it work fine)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rubensworks |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/CommunitySolidServer/CommunitySolidServer git https://github.com/CommunitySolidServer/CommunitySolidServer.git |
| octolytics-dimension-user_id | 101397807 |
| octolytics-dimension-user_login | CommunitySolidServer |
| octolytics-dimension-repository_id | 265197208 |
| octolytics-dimension-repository_nwo | CommunitySolidServer/CommunitySolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 265197208 |
| octolytics-dimension-repository_network_root_nwo | CommunitySolidServer/CommunitySolidServer |
| 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 | canary-2 |
| 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