Send LDAP user passwords to actions through stdin, not as arguments.

This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2015-07-23 22:30:50 +05:30
1 parent 86580c9121
commit cb7c9c26f7
5 files changed
+30 -11

No files matched your search

+4 -2
View File
@@ -62,7 +62,8 @@ class CreateUserForm(UserCreationForm):
try:
actions.superuser_run(
'create-ldap-user',
[user.get_username(), self.cleaned_data['password1']])
[user.get_username()],
input=self.cleaned_data['password1'])
except ActionError:
messages.error(self.request,
_('Creating LDAP user failed.'))
@@ -157,7 +158,8 @@ class UserChangePasswordForm(SetPasswordForm):
try:
actions.superuser_run(
'change-ldap-user-password',
[user.get_username(), self.cleaned_data['new_password1']])
[user.get_username()],
input=self.cleaned_data['new_password1'])
except ActionError:
messages.error(
self.request,