Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Django Template Django Template
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • IzeniIzeni
  • Django TemplateDjango Template
  • Merge requests
  • !6

Password validation

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed Luke Graybill requested to merge password-validation into master Dec 03, 2015
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes

This adds a StrengthValidator that measures the amount of entropy in a password, and refuses those which don't meet a threshold (set at 3.0 by default).

>>> StrengthValidator().calculate_shannon_entropy('password')
2.75
>>> StrengthValidator().calculate_shannon_entropy('Tr0ub4dor&3')
3.277613436819116
>>> StrengthValidator().calculate_shannon_entropy('correct horse battery staple')
3.494680368408909

I've enabled this validator instead of the MinLengthValidator that Django uses by default. (The rest of Django's default validators are still used.)

@tbrimhall @lgunnell @kcole

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: password-validation