Skip to main content

A PwnedPassword validator for Django

Project description

This package provides a password validator for Django that checks submitted passwords against the Pwned Passwords API.

To protect the security of the password being checked a range search is used. Specifically, only the first 5 characters of a SHA-1 password hash are sent to the API. The validator then locally looks for the full hash in the range returned.

Installation

pip install django-pwned-validator

Modify your settings.py to install the app and enable the validator:

INSTALLED_APPS = [
    'pwned.apps.PwnedConfig',
    ...
]

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'pwned.validators.PwnedValidator',
    },
    ...
]

Compatibility

Supports Django 2.2 to 3.2 on Python 3.5 to 3.8.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-pwned-validator-0.0.6.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pwned_validator-0.0.6-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file django-pwned-validator-0.0.6.tar.gz.

File metadata

  • Download URL: django-pwned-validator-0.0.6.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.10 Linux/4.15.0-142-generic

File hashes

Hashes for django-pwned-validator-0.0.6.tar.gz
Algorithm Hash digest
SHA256 dcb62fd9dbcc02c6771b6dd1c1f22fe2e1564785248baea54a152c5886c29000
MD5 5307a049a13fb4afe0eceaed5c5d9d5a
BLAKE2b-256 a0f815192c198a13104fa0233e285f80f8729037cb27423bda7cb3ecf8506d7d

See more details on using hashes here.

File details

Details for the file django_pwned_validator-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pwned_validator-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a813faf6b0beaee71fdc6e5fb066c9d7f6e784e5764a960a319149a2d9cebf42
MD5 b651bf867c66fdb4591574f4c6b80a84
BLAKE2b-256 699936013d32ad0e6ee72d0c4038d11ae32740adb7ecbd9becb72690b1ccc3cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page