Skip to content

Commit

Permalink
Relax active content check for renaming.
Browse files Browse the repository at this point in the history
We don't need to check against the filename
without extension, because it's only the
extension that may be problematic.

Signed-off-by: Thomas Hochstein <thh@inter.net>
  • Loading branch information
th-h committed Mar 25, 2020
1 parent 5340fe4 commit 37a04ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/functions_images.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2262,7 +2262,7 @@ function serendipity_renameFile($id, $newName, $path = null) {

$newPath = $imgBase . $path . $newName . (empty($file['extension']) ? '' : '.' . $file['extension']);

if (serendipity_isActiveFile($newName) || serendipity_isActiveFile($newPath)) {
if (serendipity_isActiveFile($newPath)) {
return sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . ERROR_FILE_FORBIDDEN . "</span>\n", $newName);
}

Expand Down

0 comments on commit 37a04ec

Please sign in to comment.