-
Committer:
Harald Sitter
-
Date:
2019-08-05 15:26:27 UTC
-
Revision ID:
git-v1:29768b08aa066acac285c6ef15210a2bada450c1
use pwquality_strerror to get error strings
Summary:
libpwquality has localized error string mappings, no need to reinvent
the wheel here. the previous mapping was fairly incomplete resulting in
cases where one would get the generic "use another password" option
was shown, which is fairly meh as it can mean literally anything.
should libpwquality for whatever reason fail to provide a string we will
still fall back to the unfortunate generic default. better than nothing
I suppose.
also carry around auxerror. it contains data such as how many digits
would have been reuired. auxerror doesn't need freeing it simply contains
pointers to internals for the benefit of pwquality_strerror
CHANGELOG: Password quality problems are better explained in the UI
Test Plan: password 'a' now gets error'd as a palindrom rather than the generic error. other errors such as too-short, no-match continue to be reported properly as well
Reviewers: #plasma, ltoscano
Reviewed By: ltoscano
Subscribers: rikmills, davidedmundson, ltoscano, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22122