Skip to content

Fix prefetch handling and validate data URLs - #276

Merged
smarr merged 2 commits into
masterfrom
fix-data-export-input-validation
Nov 14, 2026
Merged

smarr merged 2 commits into
masterfrom
fix-data-export-input-validation

Conversation

@smarr

@smarr smarr commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Node.js lower-cases all header names, which I did not previously consider.
So, hopefully that now works as intended.

And, I was not checking that ids are proper integers.

So, I got errors like the following in the logs:

  error: invalid input syntax for type integer: "NaN"
      at /home/node-deploy/sites/ReBenchDB/node_modules/pg-pool/index.js:45:11
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async DatabaseWithPool.getExperimentDetails (/home/node-deploy/sites/ReBenchDB/src/backend/db/db.ts:787:20)
      at async getExpData (/home/node-deploy/sites/ReBenchDB/src/backend/project/data-export.ts:20:18)
      at async renderDataExport (/home/node-deploy/sites/ReBenchDB/src/backend/project/project.ts:84:16)

This should now be fixed.
On Ubuntu, I needed to allow the install script for the file watcher.

So far, we had always some errors in the logs, which seems to come from bots crawling rebenchdb.

The id parsing is now validating input, and produces proper 404s.

Node.js turns header names into lower-case to be fully case insensitive, but I got this previously wrong. Fixed now.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Needed during development on Ubuntu.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr added bug Something isn't working enhancement New feature or request labels Nov 14, 2026
@smarr
smarr merged commit 1f98f9e into master Nov 14, 2026
2 checks passed
@smarr
smarr deleted the fix-data-export-input-validation branch November 14, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant