Download the PHP package nidhognit/pass-security-bundle without Composer
On this page you can find all versions of the php package nidhognit/pass-security-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nidhognit/pass-security-bundle
More information about nidhognit/pass-security-bundle
Files in nidhognit/pass-security-bundle
Package pass-security-bundle
Short Description Symfony PassSecurityBundle
License MIT
Homepage https://github.com/Nidhognit/PassSecurityBundle
Informations about the package pass-security-bundle
PassSecurityBundle
The PassSecurityBundle It is designed to help test passwords for entry into the list of unsafe.
Bundle only checks the password in the list, and tells you under what number it was found, the decision about how much it is safe, take you (or you can report it to your users, and to shift the responsibility on them).
I strongly advise against using any password that can be found on this list.
Demo example
Website: https://demo-pass-security-bundle.herokuapp.com
Source code: https://github.com/Nidhognit/demo-pass-security-bundle
Instalation
If you use composer, open a command console, enter your project directory and execute the following command:
Enable the Bundle in AppKernel like this:
The bundle comes with a sensible default configuration. If you need to change them, you can define these in config.yml
(more information for bundle configuration below).
How to use
In below example, we imagine, that you want check passwords for user before they submit form:
In this case you must use HTTPS, if you use HTTP - it is very dangerous because of the possibility of MITM.
You also can use console command:
Where 123456
- your custom password.
Documentation
Default configuration:
Value "type" can be file
(default), base
, custom
.
Type "file"
In this case, the password will be read from the file. Default file have 100 000 passwords, and you can use you own file:
Where:
castom.txt
- must have ".txt" etentions;path
- is absolute path;- Each new password in the file begins on a new line;
Default bundle have some pass files:
Pass100k
(selected by default) - list of 100 000 offen used passwords;Pass1M
- list of 1 000 000 offen used passwords;
Example (select file with 1 000 000 passwords):
Type "base"
In this case, the passwords will be read from the database. Default configuration looks like this:
You can configure the fololowing variables:
Requirements:
MyCustomEntity
must implement the interfaceInterfacePassSecurityEntity
.
You can use you own passwords data in database, or you can transfer all the data from file with following console command:
This command will write all passwords from "file" (by default Pass100K) in table, who define in entity "class" (by default 'pass_security_base'). By default this command will use Entity, and if you use very big file, it can take a lot of time and memory.
If you do not need to create entities, you can use the option "--sql" like this
Type "custom"
You can also create your own service, for check passwords.
Requirements:
- Service must implement the interface
InterfaceReader
; - The service must be available for download from container;
All versions of pass-security-bundle with dependencies
symfony/framework-bundle Version ^2.7 || ^3.0 || ^4.0
symfony/console Version ^2.7 || ^3.0 || ^4.0
symfony/dependency-injection Version ^2.7 || ^3.0 || ^4.0
symfony/config Version ^2.7 || ^3.0 || ^4.0
symfony/yaml Version ^2.7 || ^3.0 || ^4.0
doctrine/orm Version ^2.3
doctrine/doctrine-bundle Version ^1.6
incenteev/composer-parameter-handler Version ^2.0