diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py
index 523c554..7550c57 100644
--- a/ldapcherry/__init__.py
+++ b/ldapcherry/__init__.py
@@ -765,11 +765,20 @@
return self.temp_searchuser.render(searchresult = res, attrs_list = attrs_list, is_admin=is_admin)
@cherrypy.expose
- def checkppolicy(self, password):
+ def checkppolicy(self, **params):
""" search user page """
+ keys = params.keys()
+ if len(keys) != 1:
+ cherrypy.response.status = 403
+ return "bad argument"
+ password = params[keys[0]]
self._check_auth(must_admin=False)
is_admin = self._check_admin()
ret = self._checkppolicy(password)
+ if ret['match']:
+ cherrypy.response.status = 200
+ else:
+ cherrypy.response.status = 400
return json.dumps(ret, separators=(',',':'))
@cherrypy.expose
diff --git a/resources/templates/form.tmpl b/resources/templates/form.tmpl
index 1d4891c..9c862ca 100644
--- a/resources/templates/form.tmpl
+++ b/resources/templates/form.tmpl
@@ -57,7 +57,7 @@
%endfor
% elif attr['type'] == 'password':
-
+
Retype ${attr['display_name']}
% endif