Convert input DSN values to strings (fixes GH-653)
This commit is contained in:
parent
9ef72b2cfb
commit
5a16f7f012
1
CHANGES
1
CHANGES
|
@ -5,6 +5,7 @@ Version 5.8.0
|
|||
* pkg_resources is now prioritized for default version detection.
|
||||
* Updated `in_app` support to include exception frames.
|
||||
* Fixed support for `SENTRY_USER_ATTRS` in Flask.
|
||||
* Handle DSNs which are sent as unicode values in Python 2.
|
||||
|
||||
Version 5.7.2
|
||||
-------------
|
||||
|
|
|
@ -5,6 +5,7 @@ import warnings
|
|||
from raven.exceptions import InvalidDsn
|
||||
from raven.transport.threaded import ThreadedHTTPTransport
|
||||
from raven.utils import six
|
||||
from raven.utils.encoding import to_string
|
||||
from raven.utils.urlparse import parse_qsl, urlparse
|
||||
|
||||
ERR_UNKNOWN_SCHEME = 'Unsupported Sentry DSN scheme: {0} ({1})'
|
||||
|
@ -55,6 +56,7 @@ class RemoteConfig(object):
|
|||
|
||||
@classmethod
|
||||
def from_string(cls, value, transport=None, transport_registry=None):
|
||||
value = to_string(value)
|
||||
url = urlparse(value)
|
||||
|
||||
if url.scheme not in ('http', 'https'):
|
||||
|
|
Loading…
Reference in New Issue