Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
9f7879f2
提交
9f7879f2
编写于
8月 11, 2025
作者:
Cano1997
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 文件下载越权漏洞修复
上级
c65dc5f0
变更
3
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
576 行增加
和
508 行删除
+576
-508
app-file-upload.vue
src/components/app-file-upload/app-file-upload.vue
+525
-505
app-upload-file-info.vue
src/components/app-upload-file-info/app-upload-file-info.vue
+30
-2
disk-file-upload.vue
src/components/disk-file-upload/disk-file-upload.vue
+21
-1
未找到文件。
src/components/app-file-upload/app-file-upload.vue
浏览文件 @
9f7879f2
此差异已折叠。
点击以展开。
src/components/app-upload-file-info/app-upload-file-info.vue
浏览文件 @
9f7879f2
...
@@ -9,6 +9,7 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
...
@@ -9,6 +9,7 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import
{
Environment
}
from
'@/environments/environment'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
CreateElement
}
from
'vue'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
import
EntityService
from
'@/service/entity-service'
;
@
Component
({
@
Component
({
})
})
...
@@ -42,6 +43,30 @@ export default class AppUploadFileInfo extends Vue {
...
@@ -42,6 +43,30 @@ export default class AppUploadFileInfo extends Vue {
*/
*/
@
Prop
()
public
name
!
:
string
;
@
Prop
()
public
name
!
:
string
;
/**
* 应用上下文
*
* @type {*}
* @memberof AppUploadFileInfo
*/
@
Prop
()
public
context
!
:
any
;
/**
* 实体服务
*
* @type {EntityService}
* @memberof AppUploadFileInfo
*/
@
Prop
()
public
appEntityService
!
:
EntityService
;
/**
* 默认为当前实体主键id,有指定则按表单参数
*
* @type {string}
* @memberof AppUploadFileInfo
*/
@
Prop
()
public
ownerid
!
:
string
;
/**
/**
* 上传文件路径
* 上传文件路径
*
*
...
@@ -74,8 +99,11 @@ export default class AppUploadFileInfo extends Vue {
...
@@ -74,8 +99,11 @@ export default class AppUploadFileInfo extends Vue {
let
files
=
JSON
.
parse
(
this
.
value
);
let
files
=
JSON
.
parse
(
this
.
value
);
if
(
files
.
length
){
if
(
files
.
length
){
files
.
forEach
((
file
:
any
)
=>
{
files
.
forEach
((
file
:
any
)
=>
{
let
url
=
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
;
// let url = `${this.downloadUrl}/${file.id}`;
file
.
url
=
url
;
const
entityName
=
this
.
appEntityService
.
APPDENAME
;
const
base64
=
`
${
file
.
id
}
|
${
entityName
}
|
${
this
.
ownerid
}
|
${
this
.
context
.
srfpersonid
||
this
.
context
.
srfuserid
}
`
;
const
downloadUrl
=
`http://downloadpath?key=
${
window
.
btoa
(
base64
)}
`
file
.
url
=
downloadUrl
;
});
});
}
else
{
}
else
{
files
=
[]
files
=
[]
...
...
src/components/disk-file-upload/disk-file-upload.vue
浏览文件 @
9f7879f2
...
@@ -71,6 +71,7 @@ import Axios from 'axios';
...
@@ -71,6 +71,7 @@ import Axios from 'axios';
import
{
Unsubscribable
}
from
'rxjs'
;
import
{
Unsubscribable
}
from
'rxjs'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
encode
}
from
"js-base64"
;
import
{
encode
}
from
"js-base64"
;
import
EntityService
from
'@/service/entity-service'
;
@
Component
({})
@
Component
({})
export
default
class
DiskFileUpload
extends
Vue
{
export
default
class
DiskFileUpload
extends
Vue
{
...
@@ -195,6 +196,22 @@ export default class DiskFileUpload extends Vue {
...
@@ -195,6 +196,22 @@ export default class DiskFileUpload extends Vue {
*/
*/
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
/**
* 实体服务
*
* @type {EntityService}
* @memberof DiskFileUpload
*/
@
Prop
()
public
appEntityService
!
:
EntityService
;
/**
* 应用上下文
*
* @type {*}
* @memberof DiskFileUpload
*/
@
Prop
()
public
context
!
:
any
;
/**
/**
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
*
*
...
@@ -519,7 +536,10 @@ export default class DiskFileUpload extends Vue {
...
@@ -519,7 +536,10 @@ export default class DiskFileUpload extends Vue {
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
filename
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
filename
);
const
downloadUrl
=
'/ibizutilrpm/download/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
encodeURIComponent
(
name
);
// const downloadUrl = '/ibizutilrpm/download/' + this.getFolder() + '/' + id + '/' + encodeURIComponent(name);
const
entityName
=
this
.
appEntityService
.
APPDENAME
;
const
base64
=
`
${
id
}
|
${
entityName
}
|
${
this
.
getOwnerid
()}
|
${
this
.
context
.
srfpersonid
||
this
.
context
.
srfuserid
}
`
;
const
downloadUrl
=
`http://downloadpath?key=
${
window
.
btoa
(
base64
)}
`
// 发送get请求
// 发送get请求
Axios
.
get
(
downloadUrl
,
{
Axios
.
get
(
downloadUrl
,
{
headers
:
{
headers
:
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录