Skip to content

Export SQL injection fix - #2514

Merged
Ekhorn merged 6 commits into
masterfrom
bugfix/export-injection-fix
Feb 12, 2026
Merged

Ekhorn merged 6 commits into
masterfrom
bugfix/export-injection-fix

Conversation

@ebariaux

Copy link
Copy Markdown
Contributor

This currently fixes the SQL injection possibility but makes the code a bit more complex.
I'd like to take a look at PostgreSQL JDBC driver CopyManager class to further improve this code, this will be addressed in a separate issue.

@ebariaux ebariaux added the Bug Error or issue in the system label Feb 10, 2026
@ebariaux
ebariaux requested a review from a team February 10, 2026 10:30

@Ekhorn Ekhorn left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Did some manual exports, everything remains functional and performant (with 3 different attributes on 2 different assets in total ~1 million datapoints). Performance seems unaffected. This will conflict with #2020.

@Ekhorn
Ekhorn enabled auto-merge (squash) February 12, 2026 10:44
@Ekhorn
Ekhorn disabled auto-merge February 12, 2026 10:57
@Ekhorn

Ekhorn commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

I'm seeing some potential performance degradation at 10mil datapoints. I'll investigate again later today.

@Ekhorn

Ekhorn commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

Did some more testing with 10mil datapoints. Single exports take (on my system) instead of ~15s now ~19s. With 3 active streams from ~16-17s to ~19-24s (though this varies quite a lot). The time before the first chunk is received by the client increased quite significantly, likely due to the temp table and added joins. There are possible optimizations here, but let's explore those separately we would need to increase the request timeout on the frontend anyways when going past a few million datapoints.

@Ekhorn
Ekhorn enabled auto-merge (squash) February 12, 2026 22:06
@Ekhorn
Ekhorn merged commit ad27103 into master Feb 12, 2026
1 check passed
@Ekhorn
Ekhorn deleted the bugfix/export-injection-fix branch February 12, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Error or issue in the system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants