Skip to content

Commit eefb165

Browse files
committed
Merge remote-tracking branch 'upstream/4.4-dev' into 5.2-dev-upmerge-2025-04-03
2 parents 5037647 + 94bd6a8 commit eefb165

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libraries/src/User/User.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,11 @@ public function save($updateOnly = false)
771771
}
772772
}
773773

774+
// Unset the activation token, if the mail address changes - that affects both, activation and PW resets
775+
if ($this->email !== $oldUser->email && $this->id !== 0 && !empty($this->activation) && !$this->block) {
776+
$table->activation = '';
777+
}
778+
774779
// Fire the onUserBeforeSave event.
775780
$dispatcher = Factory::getApplication()->getDispatcher();
776781
PluginHelper::importPlugin('user', null, true, $dispatcher);

plugins/filesystem/local/src/Adapter/LocalAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ private function copyFile(string $sourcePath, string $destinationPath, bool $for
520520
throw new \Exception(Text::_('COM_MEDIA_MOVE_FILE_EXTENSION_INVALID'));
521521
}
522522

523+
if (!MediaHelper::checkFileExtension(pathinfo($destinationPath, PATHINFO_EXTENSION))) {
524+
throw new \Exception(Text::_('COM_MEDIA_MOVE_FILE_EXTENSION_INVALID'));
525+
}
526+
523527
if (file_exists($destinationPath) && !$force) {
524528
throw new \Exception(Text::_('COM_MEDIA_COPY_FILE_NOT_POSSIBLE_FILE_ALREADY_EXISTS'));
525529
}

0 commit comments

Comments
 (0)