Commit Graph

24 Commits

Author SHA1 Message Date
Brandon Atkinson
c5a2aa0a2a Exclude additional lookalike characters (6G8B)
* Fix #6075
2021-02-25 21:36:30 -05:00
Benedikt Rascher-Friesenhausen
b2c2f42f30 Allow defining additional characters for the password generator
See issue #3271 for a motivation of this feature.

This patch adds an additional text input to the advanced view of the password generator.  All characters of this input field (if not empty) will be added as another group to the password generator.  The characters from the excluded field have precedence over the characters from this new field, meaning any character added to both fields will *not* appear in any generated password.  As the
characters from this new field will be added as their own group to the password generator, checking the 'Include characters from every group' checkbox will
force at least character to be chosen from the new input field.

The `PasswordGenerator` class has also been changed so that the `isValid` method returns `true` if only characters from the new input field would be used.

There is a new, simple test that covers the new feature.  While the test only uses ASCII characters, any Unicode characters can be used with the new feature.
2020-03-09 23:35:55 -04:00
Wolfram Rösler
a81c6469a8 Implement Password Health Report
Introduce a password health check to the application that evaluates every entry in a database. Entries that fail  various tests are listed for user review and action. Also moves the statistics panel to the new Database -> Reports  widget. Recycled entries are excluded from the results.

We now have two classes, PasswordHealth to deal with a single password and HealthChecker to deal with all passwords of a database.

Tests include passwords that are expired, re-used, and weak.

* Closes #551

* Move zxcvbn usage to a centralized class (PasswordHealth)  and replace its usages across the application to ensure standardized interpretation of entropy calculations.

* Add new icons for the database reports view

* Updated the demo database to show off the reports
2020-02-01 09:30:12 -05:00
AndrolGenhald
e40f10657d Fix keepassxc-browser password entropy display (#3107)
* Pass correct entropy amount to keepassxc-browser instead of amount of bits for both password and passphrase.
* Rename json key from "login" to "entropy" (keeping "login" key for backwards compatibility).

* Also make some changes to entropy calculation methods:
  - Rename PassphraseGenerator::calculateEntropy to estimateEntropy
  - Rename PasswordGenerator::calculateEntropy to estimateEntropy
2019-06-19 20:40:41 -04:00
Gianluca Recchia
fc930bae69
Restore correct formatting
Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
2018-11-28 18:29:15 -05:00
Gianluca Recchia
896a66e6d8
Improve readability and type-safety
Use nullptr instead of 0 or NULL to initialize a null pointer. In some
cases, readability was enhanced by replacing 0 with more meaningful
values according to the type of the pointer being initialized.
2018-10-31 15:16:04 +01:00
Gianluca Recchia
da9afd3f6f
Reduce number of unneeded copies
This patch aims at reducing the number of copies for obejcts that could
be referenced rather than copied, because they're not modified during
the computation.
2018-10-31 15:16:04 +01:00
Janek Bevendorff
113c8eb702 Add CLI tests and improve coding style and i18n
The CLI module was lacking unit test coverage and showed some severe
coding style violations, which this patch addresses.

In addition, all uses of qCritical() with untranslatble raw char*
sequences were removed in favor of proper locale strings. These are
written to STDERR through QTextStreams and support output
redirection for testing purposes. With this change, error messages don't
depend on the global Qt logging settings and targets anymore and go
directly to the terminal or into a file if needed.

This patch also fixes a bug discovered during unit test development,
where the extract command would just dump the raw XML contents without
decrypting embedded Salsa20-protected values first, making the XML
export mostly useless, since passwords are scrambled.

Lastly, all CLI commands received a dedicated -h/--help option.
2018-10-19 21:49:54 +02:00
seregaxvm
e124f17c64 Add advanced password generator features (#1841)
* Split between simple and advanced features
* Finetune password character groups
* Support for hex passwords
2018-06-10 22:37:09 -04:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
thez3ro
e57a2e0fa9
add default charset when not specified
explicitly state the wordcount default value
2018-02-07 17:35:20 +01:00
Gianfranco Costamagna
640b09c6b2 Add code to detect a system library for zxcvbn, with fallback to the embedded one in case it is not found 2017-06-28 15:13:57 +02:00
thez3ro
a53b111182
Update and fix copyright headers 2017-06-14 15:54:43 +02:00
thez3ro
40b4dc3b61
Only printable extended ASCII 2017-05-01 01:18:42 +02:00
thez3ro
b474d34cf0
Add Extended ASCII to password generator 2017-04-28 21:36:43 +02:00
Louis-Bertrand Varin
fa7c945363
Adding EASCII character class. 2017-04-28 19:01:02 +02:00
Janek Bevendorff
cb51ec61f7
Replace remaining instances of Q_FOREACH with C++11 range-based for loops 2017-03-10 16:11:57 +01:00
TheZ3ro
b2f3cc6903 Add some password-related feature (#92)
* Add Standalone Password Generator. Closes #18 
* Add an entropy meter for passwords. Closes #84
* Don't require password repeat when it is visible. Fixes #27
2016-11-23 21:59:24 -05:00
Felix Geyer
fff9e7ac46 Convert Q_FOREACH loops to C++11 for loops.
Q_FOREACH will de deprecated soon.
2016-10-02 21:45:55 -04:00
Keith Bennett
b432103b82 Return password quality to keepasshttp client. 2014-03-23 19:09:45 +00:00
Felix Geyer
b6497d9245 Coding style fixes. 2014-01-14 21:00:27 +01:00
Felix Geyer
3af2307468 Reworked the PasswordGeneratorWidget.
It's loosely based on OS X PasswordAssistant. Generation happens as soon as a
change is made, and on open of the widget. A combobox has been added to allow
one to choose from some randomally-generated alternatives, and the UI is
generally been made a bit more compact.

Written by Michael Curtis <michael@moltenmercury.org> and revised by me.

Closes #119

https://github.com/keepassx/keepassx/pull/38
2014-01-13 00:24:25 +01:00
Felix Geyer
9c788a6e84 Support custom backends in Random.
Useful for tests.
2013-10-09 22:06:32 +02:00
Felix Geyer
2ed3201b14 Add PasswordGenerator backend.
Refs #52
2013-03-12 21:55:11 +01:00