Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject events with long URIs and data URIs #2536

Merged
merged 3 commits into from
Dec 21, 2022
Merged

Reject events with long URIs and data URIs #2536

merged 3 commits into from
Dec 21, 2022

Conversation

vinibrsl
Copy link
Contributor

@vinibrsl vinibrsl commented Dec 21, 2022

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
Copy link

bundlemon bot commented Dec 21, 2022

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.

None yet

2 participants