Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable12] Ldap password renewal fixes for NC12 #5665

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/user_ldap/css/renewPassword.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@
#renewpassword .title {
background-color: transparent;
}

input.primary,
button.primary {
background-color: #00a2e9 !important;
}
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function setPassword($userDN, $password) {
return false;
}
try {
return $this->invokeLDAPMethod('modReplace', $cr, $userDN, $password);
return @$this->invokeLDAPMethod('modReplace', $cr, $userDN, $password);
} catch(ConstraintViolationException $e) {
throw new HintException('Password change rejected.', \OC::$server->getL10N('user_ldap')->t('Password change rejected. Hint: ').$e->getMessage(), $e->getCode());
}
Expand Down
1 change: 1 addition & 0 deletions apps/user_ldap/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function __construct () {
$c->query('UserManager'),
$server->getConfig(),
$c->query('OCP\IL10N'),
$c->query('Session'),
$server->getURLGenerator()
);
});
Expand Down
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Controller/RenewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function tryRenewPassword($user, $oldPassword, $newPassword) {
$this->session->set('loginMessages', [
[], [$this->l10n->t("Please login with the new password")]
]);
$this->session->remove('needPasswordRenewal');
$this->config->setUserValue($user, 'user_ldap', 'needsPasswordReset', 'false');
return new RedirectResponse($this->urlGenerator->linkToRoute('core.login.showLoginForm', $args));
} else {
$this->session->set('renewPasswordMessages', [
Expand Down