Skip to content
Commit 29768b08 authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

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
parent a67f5fd0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment