perl-raven icon indicating copy to clipboard operation
perl-raven copied to clipboard

Using DSNs without secret key

Open martenlehmann opened this issue 4 years ago • 0 comments

Environment

Sentry SaaS (sentry.io) Sentry::Raven 1.13 in Perl 5.26.1 on Ubuntu 18.04.

Steps to Reproduce

Define a SENTRY_DSN environment variable or pass a sentry_dsn attribute without secret key (as defined at The Parts of the DSN) to

Sentry::Raven->new();

Expected Result

The initialization should happen silently.

Actual Result

The initialization fails with the error

unable to parse public and secret keys from: <SENTRY_DSN>

This originates from https://github.com/getsentry/perl-raven/blob/5b5b123eebbaa4fab4bd5fdac7df4f179b2c883e/lib/Sentry/Raven.pm#L185

Even examples (e.g. at JavaScript configuration) show this type of usage. Since the other client libraries (like Python or JavaScript) can handle it, so should the Perl client. Checking for the colon in the userinfo shouldn't be enforced.

My current workaround: Adding : (ie. an empty secret key) before the @ in the DSN.

martenlehmann avatar Apr 04 '21 19:04 martenlehmann