Skip to content

Reject events with long URIs and data URIs - #2536

Merged
ukutaht merged 3 commits into
masterfrom
reject-data-uris
Dec 21, 2022
Merged

Reject events with long URIs and data URIs#2536
ukutaht merged 3 commits into
masterfrom
reject-data-uris

Conversation

@vinibrsl

@vinibrsl vinibrsl commented Dec 21, 2022

Copy link
Copy Markdown
Contributor

Changes

This pull request makes a change to ingestion that rejects events with data URIs and long URIs.

We haven't seen a practical case for tracking data URIs, and those can actually cause some noise on the dashboard when triggered by a browser extension or any other external source.

Additionally, long URIs are also rejected. I set a maximum length of 2,000 characters for pathnames, which should be a reasonable size. I've searched for an official specification for pathnames, but RFC 2616 says there is no limit, so each browser implements it differently. Modern browsers accept gigantic URIs due data URIs I mentioned before.

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

Dark mode

  • This PR does not change the UI

@vinibrsl
vinibrsl requested a review from a team December 21, 2022 11:18
@bundlemon

bundlemon Bot commented Dec 21, 2022

Copy link
Copy Markdown

BundleMon

Unchanged files (7)
Status Path Size Limits
static/css/app.css
515.19KB -
static/js/dashboard.js
297.95KB -
static/js/app.js
12.13KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.06KB -
tracker/js/plausible.js
748B -
static/js/applyTheme.js
314B -

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@ukutaht
ukutaht merged commit 5152e8d into master Dec 21, 2022
@ukutaht
ukutaht deleted the reject-data-uris branch December 21, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants