From 0227c25e4ed573d3095ada3f9c9a4ba5f18b0de5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 20 一月 2021 10:53:01 +0800
Subject: [PATCH] 2021-01-20

---
 src/utils/utils.js |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index cca9ea7..f97d965 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -48,6 +48,7 @@
     for (let i = 0; i < 6; i++) {
       name.push(_options.substr(Math.floor(Math.random() * 26), 1))
     }
+    name.splice(3, 0, new Date().getTime())
     return name.join('')
   }
 
@@ -131,12 +132,15 @@
       {key: 'sys.', reg: /(^|\s)sys\./ig},
       {key: 'kill', reg: /(^|\s)kill\s/ig}
     ]
-
+    
     if (type === 'customscript') {
       chars = chars.filter(char => !['insert', 'delete', 'update', 'set', 'if', 'exec'].includes(char.key))
     }
 
     let error = ''
+    
+    sql = sql.replace(/sys\.fn_sqlvarbasetostr\(HashBytes\('MD5'/ig, '') // 璺宠繃MD5鍔犲瘑
+
     chars.forEach(char => {
       if (!error && char.reg.test(sql)) {
         error = char.key
@@ -165,7 +169,7 @@
     value = value.replace(/%/ig, ' mpercent ')
     // 澶栬仈鏁版嵁搴撴浛鎹�
     if (window.GLOB.externalDatabase !== null) {
-      value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`)
+      value = value.replace(/@db@/ig, window.GLOB.externalDatabase)
     }
     // encode缂栫爜锛堜腑鏂囧瓧绗﹁秴鍑篵ase64鍔犲瘑鑼冨洿锛�
     value = window.btoa(window.encodeURIComponent(value))
@@ -236,7 +240,7 @@
     value = value.replace(/%/ig, ' mpercent ')
     // 澶栬仈鏁版嵁搴撴浛鎹�
     if (window.GLOB.externalDatabase !== null) {
-      value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`)
+      value = value.replace(/@db@/ig, window.GLOB.externalDatabase)
     }
 
     let encodesql = (val) => {
@@ -695,7 +699,7 @@
     if (process.env.NODE_ENV === 'production') {
       baseurl = document.location.origin + '/' + window.GLOB.service
     } else {
-      baseurl = window.GLOB.location + window.GLOB.service
+      baseurl = window.GLOB.location + '/' + window.GLOB.service
     }
 
     let realurl = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url

--
Gitblit v1.8.0