From 53df2b9491a0755a38b99e8cfbada87668631323 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 17 Feb 2013 13:50:58 +0000 Subject: [PATCH] Easier handling of mapped cracklib strings. --- Webperl/AuthMethod.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Webperl/AuthMethod.pm b/Webperl/AuthMethod.pm index 8dc328b..f0079c4 100644 --- a/Webperl/AuthMethod.pm +++ b/Webperl/AuthMethod.pm @@ -395,7 +395,13 @@ sub apply_policy { # If mapres is the same as crackres (ie: mapping to a localisable string ID failed), # try to at least make it more readable - $mapres =~ s/^it/The password/ if($mapres eq $crackres); + if($mapres eq $crackres) { + $mapres =~ s/^it/The password/; + + # Otherwise, wrap in langvar marker stuff + } else { + $mapres = "{L_".$mapres."}"; + } $failures -> {"policy_use_cracklib"} = [1, $mapres] }