Passwords stored salt and some change is password logic
This commit is contained in:
@@ -192,6 +192,14 @@ if (mastodonParams.get('mastodon_error')) setStatus('#mastodon-status', mastodon
|
||||
|
||||
passwordForm.addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
const password = passwordForm.elements.new_password.value;
|
||||
const confirmation = passwordForm.elements.new_password_confirmation.value;
|
||||
if (password !== confirmation) {
|
||||
const status = document.querySelector('#password-status');
|
||||
status.textContent = 'New passwords do not match.';
|
||||
status.style.color = '#f38ba8';
|
||||
return;
|
||||
}
|
||||
const response = await fetch('/api/user/password', {
|
||||
method: 'PUT',
|
||||
headers: authHeaders(true),
|
||||
|
||||
Reference in New Issue
Block a user