Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
bae64d01
提交
bae64d01
authored
10月 11, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into dev
上级
09c5816d
04156d08
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
17 行增加
和
2 行删除
+17
-2
SqlFilter.java
...d/src/main/java/io/dataease/commons/filter/SqlFilter.java
+8
-0
en.js
frontend/src/lang/en.js
+1
-0
tw.js
frontend/src/lang/tw.js
+1
-0
zh.js
frontend/src/lang/zh.js
+1
-0
form.vue
frontend/src/views/system/datasource/form.vue
+6
-2
没有找到文件。
backend/src/main/java/io/dataease/commons/filter/SqlFilter.java
浏览文件 @
bae64d01
...
...
@@ -5,6 +5,7 @@ import io.dataease.commons.wrapper.XssAndSqlHttpServletRequestWrapper;
import
org.apache.commons.lang3.StringUtils
;
import
javax.servlet.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
...
...
@@ -22,6 +23,13 @@ public class SqlFilter implements Filter {
@Override
public
void
doFilter
(
ServletRequest
request
,
ServletResponse
response
,
FilterChain
chain
)
throws
IOException
,
ServletException
{
HttpServletRequest
httpRequest
=
(
HttpServletRequest
)
request
;
HttpServletResponse
httpResponse
=
(
HttpServletResponse
)
response
;
if
(
"TRACE"
.
equalsIgnoreCase
(
httpRequest
.
getMethod
())
||
"TRACK"
.
equalsIgnoreCase
(
httpRequest
.
getMethod
()))
{
httpResponse
.
setStatus
(
HttpServletResponse
.
SC_METHOD_NOT_ALLOWED
);
return
;
}
String
method
=
"GET"
;
String
param
=
""
;
XssAndSqlHttpServletRequestWrapper
xssRequest
=
null
;
...
...
frontend/src/lang/en.js
浏览文件 @
bae64d01
...
...
@@ -1154,6 +1154,7 @@ export default {
please_input_acquire_increment
:
'Please enter the growth number'
,
please_input_connect_timeout
:
'Please enter the connection timeout (seconds)'
,
no_less_then_0
:
'Parameters in advanced settings cannot be less than zero'
,
port_no_less_then_0
:
'Port cannot be less than zero'
,
priority
:
'Advanced setting'
,
extra_params
:
'Extra JDBC connection string'
},
...
...
frontend/src/lang/tw.js
浏览文件 @
bae64d01
...
...
@@ -1157,6 +1157,7 @@ export default {
please_input_acquire_increment
:
'請輸入增長數'
,
please_input_connect_timeout
:
'請輸入連接超時(秒)'
,
no_less_then_0
:
'高級設置中的參數不能小于零'
,
port_no_less_then_0
:
'端口不能小於零'
,
priority
:
'高級設置'
,
extra_params
:
'額外的JDBC連接字符串'
},
...
...
frontend/src/lang/zh.js
浏览文件 @
bae64d01
...
...
@@ -1158,6 +1158,7 @@ export default {
please_input_acquire_increment
:
'请输入增长数'
,
please_input_connect_timeout
:
'请输入连接超时(秒)'
,
no_less_then_0
:
'高级设置中的参数不能小于零'
,
port_no_less_then_0
:
'端口不能小于零'
,
priority
:
'高级设置'
,
data_mode
:
'数据模式'
,
direct
:
'直连模式'
,
...
...
frontend/src/views/system/datasource/form.vue
浏览文件 @
bae64d01
...
...
@@ -56,8 +56,8 @@
<el-input
v-model=
"form.configuration.extraParams"
autocomplete=
"off"
/>
</el-form-item>
<el-form-item
v-if=
"form.configuration.dataSourceType=='jdbc'"
:label=
"$t('datasource.port')"
prop=
"configuration.port"
>
<el-input
v-model=
"form.configuration.port"
autocomplete=
"off"
/>
<el-form-item
v-if=
"form.configuration.dataSourceType=='jdbc'"
:label=
"$t('datasource.port')"
prop=
"configuration.port"
>
<el-input
v-model=
"form.configuration.port"
autocomplete=
"off"
type=
"number"
min=
"0"
/>
</el-form-item>
<el-form-item
v-if=
"form.type=='oracle' || form.type=='sqlServer' || form.type=='pg'"
>
<el-button
icon=
"el-icon-plus"
size=
"mini"
@
click=
"getSchema()"
>
...
...
@@ -225,6 +225,10 @@ export default {
this
.
$message
.
error
(
this
.
$t
(
'datasource.please_choose_schema'
))
return
}
if
(
this
.
form
.
configuration
.
dataSourceType
===
'jdbc'
&&
this
.
form
.
configuration
.
port
<=
0
)
{
this
.
$message
.
error
(
this
.
$t
(
'datasource.port_no_less_then_0'
))
return
}
if
(
this
.
form
.
configuration
.
initialPoolSize
<
0
||
this
.
form
.
configuration
.
minPoolSize
<
0
||
this
.
form
.
configuration
.
maxPoolSize
<
0
||
this
.
form
.
configuration
.
maxIdleTime
<
0
||
this
.
form
.
configuration
.
acquireIncrement
<
0
||
this
.
form
.
configuration
.
idleConnectionTestPeriod
<
0
||
this
.
form
.
configuration
.
connectTimeout
<
0
)
{
this
.
$message
.
error
(
this
.
$t
(
'datasource.no_less_then_0'
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论