mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Actually connect events to the correct project when the header is provided
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
def parse_auth_header(header):
|
||||
# KvS: isn't this always either bytes or strings? I'd like to learn more (first quickly, and then formalizing for
|
||||
# actual uses)
|
||||
# https://github.com/getsentry/sentry/pull/12108 is the non-explanation
|
||||
if isinstance(header, bytes):
|
||||
print("it's bytes, probably always so")
|
||||
header = header.decode("latin1")
|
||||
else:
|
||||
print("not bytes, already a string")
|
||||
# Sentry has code in place here to parse bytes (from latin1). Based on how Django works, I'd like to think that's
|
||||
# not needed. https://github.com/getsentry/sentry/pull/12108 is the non-explanation
|
||||
# if isinstance(header, bytes): header = header.decode("latin1")
|
||||
|
||||
try:
|
||||
_, rhs = header.split(" ", 1)
|
||||
|
||||
Reference in New Issue
Block a user