1
0

Relax active content check for renaming.

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>
This commit is contained in:
Thomas Hochstein
2020-03-25 21:43:12 +01:00
parent 3148e44f87
commit 1b6840d98e

@ -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);
}