projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
242a6c7
)
fix the evaluation of password quality; thanks to the clang static analyzer for point...
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 24 May 2011 21:48:49 +0000
(21:48 +0000)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 24 May 2011 21:48:49 +0000
(21:48 +0000)
webcit/auth.c
patch
|
blob
|
history
diff --git
a/webcit/auth.c
b/webcit/auth.c
index d37382f224d8a22c144114e7a5a19a6dff3e35dd..fde5a501b1d6e8d06f4a79dfdbde5511b6133c6c 100644
(file)
--- a/
webcit/auth.c
+++ b/
webcit/auth.c
@@
-681,7
+681,7
@@
void validate(void)
int haveChar = 0;
int haveNum = 0;
int haveOther = 0;
- int
count
= 0;
+ int
haveLong
= 0;
pch = buf;
while (!IsEmptyStr(pch))
{
@@
-693,10
+693,13
@@
void validate(void)
haveOther = 1;
pch ++;
}
- count = pch - buf;
- if (count > 7)
- count = 0;
- switch (count){
+ if (pch - buf > 7)
+ haveLong = 1;
+ switch (haveLong +
+ haveChar +
+ haveNum +
+ haveOther)
+ {
case 0:
pch = _("very weak");
break;