Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spencer Chang
dp
Commits
7be6056c
Commit
7be6056c
authored
Dec 11, 2020
by
Spencer Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 参数简单脱敏处理
parent
b6776e88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
SysDpExecuteHistoryController.java
...va-code/dp/controllers/SysDpExecuteHistoryController.java
+4
-1
SysDpExecuteHistoryV2Controller.java
...de/dp/controllers/v2/SysDpExecuteHistoryV2Controller.java
+5
-1
sys_dp.lview
v2-多线程版本/lview-code/DP/DP001/sys_dp.lview
+4
-2
No files found.
v2-多线程版本/java-code/dp/controllers/SysDpExecuteHistoryController.java
View file @
7be6056c
...
...
@@ -9,6 +9,7 @@ import com.hand.hls.dp.service.SysDpExecuteHistoryService;
import
com.hand.hls.dp.util.IPUtils
;
import
leaf.bean.LeafRequestData
;
import
org.apache.commons.codec.binary.Base64
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLDecoder
;
import
java.nio.charset.StandardCharsets
;
/**
...
...
@@ -39,7 +41,8 @@ public class SysDpExecuteHistoryController extends BaseController {
IRequest
requestContext
=
createRequestContext
(
request
);
RequestHelper
.
setCurrentRequest
(
requestContext
);
final
String
ip
=
IPUtils
.
getIpAddress
(
request
);
final
String
dpContext
=
(
String
)
requestData
.
get
(
"parameter"
);
final
String
param
=
(
String
)
requestData
.
get
(
"parameter"
);
final
String
dpContext
=
URLDecoder
.
decode
(
new
String
(
Base64
.
decodeBase64
(
param
),
StandardCharsets
.
UTF_8
),
"UTF-8"
);
if
(
ck
==
0
){
service
.
query4ck
(
requestContext
,
ip
,
dpContext
);
}
else
if
(
ck
==
1
){
...
...
v2-多线程版本/java-code/dp/controllers/v2/SysDpExecuteHistoryV2Controller.java
View file @
7be6056c
...
...
@@ -8,6 +8,7 @@ import com.hand.hls.dp.service.SysDpDownloadLogService;
import
com.hand.hls.dp.service.SysDpExecuteHistoryService
;
import
com.hand.hls.dp.util.IPUtils
;
import
leaf.bean.LeafRequestData
;
import
org.apache.commons.codec.binary.Base64
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLDecoder
;
import
java.nio.charset.StandardCharsets
;
/**
* @author <a href="mailto:zhangnet14@gmail.com">Spencer Chang</a>
...
...
@@ -35,7 +38,8 @@ public class SysDpExecuteHistoryV2Controller extends BaseController {
IRequest
requestContext
=
createRequestContext
(
request
);
RequestHelper
.
setCurrentRequest
(
requestContext
);
final
String
ip
=
IPUtils
.
getIpAddress
(
request
);
final
String
dpContext
=
(
String
)
requestData
.
get
(
"parameter"
);
final
String
param
=
(
String
)
requestData
.
get
(
"parameter"
);
final
String
dpContext
=
URLDecoder
.
decode
(
new
String
(
Base64
.
decodeBase64
(
param
),
StandardCharsets
.
UTF_8
),
"UTF-8"
);
return
service
.
execute
(
requestContext
,
ip
,
dpContext
);
}
...
...
v2-多线程版本/lview-code/DP/DP001/sys_dp.lview
View file @
7be6056c
...
...
@@ -5,7 +5,8 @@
<script>
<![CDATA[
function dp001_query() {
$('dp001_query_btn').disable();
let dpContext = document.getElementById('context_tta').value;
let tmp = document.getElementById('context_tta').value;
let dpContext = window.btoa(window.encodeURIComponent(tmp));
Leaf.showConfirm('${l:HLS.PROMPT}', '确认执行当前语句吗?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
Leaf.request({
...
...
@@ -52,7 +53,8 @@
function dp001_exec() {
$('dp001_exec_btn').disable();
let dpContext = document.getElementById('context_tta').value;
let tmp = document.getElementById('context_tta').value;
let dpContext = window.btoa(window.encodeURIComponent(tmp));
Leaf.showConfirm('${l:HLS.PROMPT}', '确认执行当前语句吗?', function okFun() {
document.getElementById('result_tta').value = null;
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment