Skip to content

"quart_session" TypeError: cannot use a string pattern on a bytes-like object #21

@zrorolocete

Description

@zrorolocete

sessions.py
if self.use_signer:
session_id = self._get_signer(app).sign(want_bytes(session.sid))
else:
session_id = session.sid
response.set_cookie(cname, session_id,
expires=expires, httponly=httponly,
domain=domain, path=path, secure=secure, samesite=samesite)
set_cookie not allowed a byte type value, have to decode to str type:session_id = session_id.decode('utf-8')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions