#27635: django.utils.crypto should use secrets on Python 3.6+
-------------------------------------+-------------------------------------
     Reporter:  Adam Chainz          |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Utilities            |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Someday/Maybe
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * has_patch:  1 => 0
 * stage:  Accepted => Someday/Maybe


Comment:

 Python's `secrets.py` does `from random import SystemRandom` so this
 doesn't change any behavior or add security for now. Adam said,
 "Presumably the intention is that secrets might one day use a different
 PRNG's on some OS's." Let's make the change if the benefits become more
 than theoretical or when only Python 3.6+ is supported.

 Another possibility Aymeric mentioned, "In the long run I think we should
 deprecate get_random_string in favor of similar functions provided by the
 secrets module. I didn't check whether there was a sensible transition
 plan to make use of secrets on Python 3.6 while still supporting older
 versions."

--
Ticket URL: <https://code.djangoproject.com/ticket/27635#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.eb190b50dbeef013c434c108131a7292%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to