﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37549	"Signer rejects separators ""["", ""\"", ""]"", ""^"" and ""`"" as unsafe due to an A-z regex range"	Maddipatla Chatan		"_SEP_UNSAFE in django/core/signing.py is r""^[A-z0-9-_=]*$"". The A-z range also covers the six ASCII characters between ""Z"" and ""a"": [ \ ] ^ _ and `. So Signer(sep=""["") (and \ ] ^ `) raises ""Unsafe Signer separator"", even though none of these characters appear in base64url signatures.

{{{
>>> from django.core import signing
>>> signing.Signer(key=""k"", sep=""["")
ValueError: Unsafe Signer separator: '[' (cannot be empty or consist of only A-z0-9-_=)
}}}

The check was added in #22804, whose patch defined the unsafe set as digits, A-Z, a-z, ""-"", ""_"" and ""="", so the range was meant to be A-Za-z. (""_"" stays unsafe since it is already listed explicitly.)

AI disclosure: I used Claude (Anthropic) to help verify this and draft the fix and tests. I reviewed and tested them myself."	Bug	new	Core (Other)	dev	Normal			Maddipatla Chatan	Unreviewed	0	0	0	0	0	0
