Skip to content

Support base64 URL safe decode / encode #3840

Closed
@verigak

Description

@verigak

Problem to solve

Django's urlsafe_base64_encode strips the trailing = which then causes base64Decode to fail.

https://github.com/django/django/blob/e7a9d756eedd0317132c81c3695d4a34bba5dcd3/django/utils/http.py#L177-L182

Proposal

It would be nice if base64Decode could handle missing padding. urlsafe_base64_decode in Django achieves this by appending any missing = before decoding: https://github.com/django/django/blob/e7a9d756eedd0317132c81c3695d4a34bba5dcd3/django/utils/http.py#L185-L194

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions