-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Refs #27468 -- Included algorithm in Signer signature. #12386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure about the deprecation period for the legacy format. I wonder if we should wait for 4.1, so as when Django 4.0 is out, it is still able to unsign a Django2.2 value (still supported at that time). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spearheading this work @claudep 🙇
Except for the comments I left I had a more general question. Now that we add support for multiple digestmod
s it feels like it could be valuable to have unsign
and loads
accept a set of allowed algorithms. This way you could ensure that only values signed with a specified algorithm are considered valid without subclassing Signer
.
I realize it might be more appropriate to discuss this on the mailing list but I thought I'd throw the idea around here to gather some feedback given you're already spent a bit of time tackling this issue.
Absolutely, the idea is to allow a set of approved algorithms in |
This commit prepares the way for different algorithms. Co-Authored-By: Simon Charette <charettes@users.noreply.github.com>
@PaulMcMillan @ubernostrum could we have some input on those changes? |
Like @charettes I would want to see support in The thing I mostly want to avoid is a situation where we do negotiation on the algorithm, because that puts the ultimate choice in the hands of an attacker: if they know a Django install accepts any out of a list of algorithms, they can choose the worst/weakest one and craft a value to exploit it. Which is generally why things like cipher negotiation are frowned on in cryptography. So what would people think about making the signatures of |
Thanks ubernostrum for your input. |
@ubernostrum, is #12454 more in line with what you imagined? |
We'll concentrate on PR #12454. |
This commit prepares the way for different algorithms.