You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Trim DSN string before URI parsing
Trailing or leading whitespace in the DSN string (commonly introduced
by copy-paste) causes a URISyntaxException that crashes the application
on startup. Trim the DSN before passing it to the URI constructor.
FixesGH-5087
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: Add changelog entry for DSN trimming fix
Co-Authored-By: Claude <noreply@anthropic.com>
* also trim on SentryOptions.setDsn
* fix: Throw clear error when DSN is empty
Previously an empty or whitespace-only DSN string would fall through
to the URI constructor, producing a confusing error message. Now the
Dsn constructor checks for empty strings after trimming and throws
an IllegalArgumentException with a clear message.
Co-Authored-By: Claude <noreply@anthropic.com>
* Format code
* ci: retrigger checks
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@
31
31
### Fixes
32
32
33
33
- Fix crash when unregistering `SystemEventsBroadcastReceiver` with try-catch block. ([#5106](https://github.com/getsentry/sentry-java/pull/5106))
34
+
- Trim DSN string before parsing to avoid `URISyntaxException` caused by trailing whitespace ([#5113](https://github.com/getsentry/sentry-java/pull/5113))
0 commit comments