Skip to content

Commit 4feb29b

Browse files
committed
SourceForm: Ensure updating the password updates the password
fixes #343
1 parent 0dd85aa commit 4feb29b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

application/forms/SourceForm.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,14 @@ public function editSource(): void
173173
{
174174
$source = $this->getValues();
175175

176-
if (empty(array_diff_assoc($source, $this->fetchDbValues()))) {
177-
return;
178-
}
179-
180176
/** @var ?string $listenerPassword */
181177
$listenerPassword = $this->getValue('listener_password');
182178
if ($listenerPassword) {
183179
// Not using PASSWORD_DEFAULT, as the used algorithm should
184180
// be kept in sync with what the daemon understands
185181
$source['listener_password_hash'] = password_hash($listenerPassword, self::HASH_ALGORITHM);
182+
} elseif (empty(array_diff_assoc($source, $this->fetchDbValues()))) {
183+
return;
186184
}
187185

188186
$source['changed_at'] = (int) (new DateTime())->format("Uv");

0 commit comments

Comments
 (0)