
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
django-plainpasswordhasher
Advanced tools
########################## django-plainpasswordhasher ##########################
Dummy (plain text) password hashing for Django... for use in tests!
Speed up tests!
Cryptography is greedy. When you run tests, you usually do not care about password security, but you care about performances. Using dummy password hashing speeds up tests!
Install django-plainpasswordhasher
with your favorite installer.
Here is an example using pip:
.. code:: sh
pip install django-plainpasswordhasher
Then configure your test settings:
.. code:: python
PASSWORD_HASHERS = ('django_plainpasswordhasher.PlainPasswordHasher', )
Except explicit password hashing tests
In most cases, using a dummy password hasher will do the job. But you may write some tests that require real password hashing. In such a case, let's override settings!
.. code:: python
from django.conf import global_settings # Django default settings... # You may use your project's # default settings instead. from django.test import TestCase from django.test.utils import override_settings
@override_settings(PASSWORD_HASHERS=global_settings.PASSWORD_HASHERS) class CryptographyTestCase(TestCase): """Tests that require real cryptography."""
Resources
References
Original blog post <http://tech.novapost.fr/django-comment-booster-ses-tests-en-1-minute.html>
_
Django 1.5 documentation about getting faster tests <https://docs.djangoproject.com/en/1.5/topics/testing/#speeding-up-the-tests>
_
Discussion about password hashers & testing in Django issues <https://code.djangoproject.com/ticket/20917>
_
FAQs
Dummy (plain text) password hashing for Django.
We found that django-plainpasswordhasher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.