mirror of
https://github.com/KOHGYLW/kiftd-source.git
synced 2025-01-08 12:07:47 +08:00
update to v1.2.2-release
This commit is contained in:
parent
bd3b43b726
commit
9c472fe067
@ -1,7 +1,7 @@
|
||||
## 欢迎访问kiftd源代码资源库!
|
||||
### Welcome to visit source of kiftd!
|
||||
|
||||
_当前版本:v1.2.1-RELEASE_
|
||||
_当前版本:v1.2.2-RELEASE_
|
||||
|
||||
### 简介
|
||||
_kiftd——一款便捷、开源、功能完善的个人&团队&小型团队网盘服务器系统。_
|
||||
@ -72,5 +72,5 @@ _提示:源代码路径下包含了一些程序运行所需的非源代码资
|
||||
### 联系作者?
|
||||
如有任何需要(例如对该资源有疑问、意见或建议),请发件联系作者: kohgylw@163.com (青阳龙野),随时恭候您的来信!
|
||||
|
||||
青阳龙野@kohgylw by 2024年07月06日
|
||||
青阳龙野@kohgylw by 2024年07月20日
|
||||
|
||||
|
4
TODO.txt
4
TODO.txt
@ -224,3 +224,7 @@ test.auth.xxx=ucd
|
||||
【已完成】修复了“最大下载速度限制”功能无法正确识别某些负数设置的问题。
|
||||
【已完成】更正了《kiftd说明文档》中的部分内容。
|
||||
【已完成】其他一些细节优化。
|
||||
|
||||
已完成 v1.2.2
|
||||
--------------
|
||||
【已完成】修复了“剪切-粘贴”功能中存在的一个漏洞。
|
||||
|
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>kohgylw</groupId>
|
||||
<artifactId>kiftd</artifactId>
|
||||
<version>1.2.1-RELEASE</version>
|
||||
<version>1.2.2-RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>kiftd</name>
|
||||
|
@ -551,11 +551,6 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
if (!ConfigureReader.instance().authorized(account, AccountAuth.MOVE_FILES, fu.getAllFoldersId(locationpath))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
// 如果执行的是剪切操作,则还需要同时具备删除权限
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(locationpath))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
// 对涉及的文件和文件夹逐一进行移动或复制操作
|
||||
try {
|
||||
// 获取存在冲突的文件的对应处理表
|
||||
@ -594,7 +589,11 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
}
|
||||
if (!ConfigureReader.instance().authorized(account, AccountAuth.MOVE_FILES,
|
||||
fu.getAllFoldersId(node.getFileParentFolder()))) {
|
||||
return NO_AUTHORIZED;// 无操作权限
|
||||
return NO_AUTHORIZED;// 无移动操作权限
|
||||
}
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(node.getFileParentFolder()))) {
|
||||
return NO_AUTHORIZED;// 进行剪切但没有删除权限
|
||||
}
|
||||
// 记录原始的文件路径,便于执行后记录日志
|
||||
String originPath = fbu.getNodePath(node);
|
||||
@ -732,6 +731,10 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
fu.getAllFoldersId(folder.getFolderParent()))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(folder.getFolderParent()))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
// 对于非复制操作,还必须确保移动目标不在被移动文件夹的内部,否则移动后就永远无法访问它了
|
||||
if (!isCopy) {
|
||||
if (fid.equals(locationpath) || fu.getParentList(locationpath).parallelStream()
|
||||
@ -913,11 +916,6 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
// 权限检查,确认是否具备移动权限
|
||||
if (ConfigureReader.instance().accessFolder(targetFolder, account) && ConfigureReader.instance()
|
||||
.authorized(account, AccountAuth.MOVE_FILES, fu.getAllFoldersId(locationpath))) {
|
||||
// 如果执行的是剪切操作,则还需要同时具备删除权限
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(locationpath))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
try {
|
||||
final List<String> idList = gson.fromJson(strIdList, new TypeToken<List<String>>() {
|
||||
}.getType());
|
||||
@ -949,6 +947,10 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
fu.getAllFoldersId(node.getFileParentFolder()))) {
|
||||
return NO_AUTHORIZED;// 无权操作
|
||||
}
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(node.getFileParentFolder()))) {
|
||||
return NO_AUTHORIZED;// 只能复制不能剪切
|
||||
}
|
||||
if (fm.queryByParentFolderId(locationpath).parallelStream()
|
||||
.anyMatch((e) -> e.getFileName().equals(node.getFileName()))) {
|
||||
repeNodes.add(node);// 与目标文件夹里的某个文件夹重名?重名列表加一
|
||||
@ -976,6 +978,10 @@ public class FileServiceImpl extends RangeFileStreamWriter implements FileServic
|
||||
fu.getAllFoldersId(folder.getFolderParent()))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
if (!isCopy && !ConfigureReader.instance().authorized(account, AccountAuth.DELETE_FILE_OR_FOLDER,
|
||||
fu.getAllFoldersId(folder.getFolderParent()))) {
|
||||
return NO_AUTHORIZED;
|
||||
}
|
||||
// 对于文件夹而言,在移动模式下还要检查是否将一个文件夹移动到自己内部了,避免死循环
|
||||
// 复制模式无需检查这一项
|
||||
if (!isCopy) {
|
||||
|
@ -38,7 +38,7 @@ Class-Path: libs/spring-boot-starter-web-2.7.0.jar libs/spring-boot-star
|
||||
r libs/commons-codec-1.15.jar libs/flexmark-0.50.44.jar libs/flexmark-u
|
||||
til-0.50.44.jar
|
||||
Implementation-Title: kiftd
|
||||
Implementation-Version: 1.2.1-RELEASE
|
||||
Implementation-Version: 1.2.2-RELEASE
|
||||
Main-Class: kohgylw.kiftd.mc.MC
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Sun Jul 07 21:01:20 CST 2024
|
||||
#Sat Jul 20 09:45:56 CST 2024
|
||||
m2e.projectLocation=/Users/kohgylw/Programs/java_workspace/kiftd
|
||||
m2e.projectName=kiftd
|
||||
groupId=kohgylw
|
||||
artifactId=kiftd
|
||||
version=1.2.1-RELEASE
|
||||
version=1.2.2-RELEASE
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>kohgylw</groupId>
|
||||
<artifactId>kiftd</artifactId>
|
||||
<version>1.2.1-RELEASE</version>
|
||||
<version>1.2.2-RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>kiftd</name>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<!-- 青阳网络文件传输系统 kiftd v1.2.1-RELEASE -->
|
||||
<!-- 青阳网络文件传输系统 kiftd v1.2.2-RELEASE -->
|
||||
<!-- 欢迎访问主界面 -->
|
||||
<!-- by 青阳龙野(kohgylw@163.com) -->
|
||||
<html>
|
||||
|
Loading…
Reference in New Issue
Block a user