@bchr/bchr-front-lib 0.3.117 → 0.3.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,24 +131,14 @@ var HttpService = /*#__PURE__*/function () {
131
131
  rpcMethodName = "";
132
132
  }
133
133
 
134
- if (!this.__checkJSONObjectSecurity(jsonObject)) {
135
- if (jsonObject) {
136
- ajaxOptions.data = jsonObject;
137
- }
138
-
139
- if (ajaxOptions.rpcMethodName) {
140
- delete ajaxOptions.rpcMethodName;
141
- }
142
-
143
- ajaxOptions.type = "post";
144
- ajaxOptions.dataType = "json";
145
-
146
- if (!ajaxOptions.url) {
147
- ajaxOptions.url = this.requestContextPath + rpcMethodName;
148
- }
134
+ ajaxOptions.type = "post";
135
+ ajaxOptions.dataType = "json";
149
136
 
150
- return _jquery["default"].ajax(ajaxOptions);
137
+ if (!ajaxOptions.url) {
138
+ ajaxOptions.url = this.requestContextPath + rpcMethodName;
151
139
  }
140
+
141
+ return _jquery["default"].ajax(ajaxOptions);
152
142
  }
153
143
  }, {
154
144
  key: "__postForMock",
@@ -324,7 +314,7 @@ var HttpService = /*#__PURE__*/function () {
324
314
  var containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
325
315
 
326
316
  if (containsHTML) {
327
- throw new Error("不安全的输入,请检查!");
317
+ throw new Error("不安全的输入,请检查!【" + str + "】");
328
318
  }
329
319
  }
330
320
  }, {
@@ -364,7 +354,7 @@ var HttpService = /*#__PURE__*/function () {
364
354
  var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
365
355
 
366
356
  if (containsHTML) {
367
- throw new Error("不安全的输入,请检查!");
357
+ throw new Error("不安全的输入,请检查!【" + str + "】");
368
358
  }
369
359
  }
370
360
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bchr/bchr-front-lib",
3
- "version": "0.3.117",
3
+ "version": "0.3.118",
4
4
  "description": "bchr front lib",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -114,24 +114,14 @@ class HttpService {
114
114
  rpcMethodName = "";
115
115
  }
116
116
 
117
- if (!this.__checkJSONObjectSecurity(jsonObject)) {
118
- if (jsonObject) {
119
- ajaxOptions.data = jsonObject;
120
- }
121
-
122
- if (ajaxOptions.rpcMethodName) {
123
- delete ajaxOptions.rpcMethodName;
124
- }
125
-
126
- ajaxOptions.type = "post";
127
- ajaxOptions.dataType = "json";
128
-
129
- if (!ajaxOptions.url) {
130
- ajaxOptions.url = this.requestContextPath + rpcMethodName;
131
- }
117
+ ajaxOptions.type = "post";
118
+ ajaxOptions.dataType = "json";
132
119
 
133
- return $.ajax(ajaxOptions);
120
+ if (!ajaxOptions.url) {
121
+ ajaxOptions.url = this.requestContextPath + rpcMethodName;
134
122
  }
123
+
124
+ return $.ajax(ajaxOptions);
135
125
  }
136
126
 
137
127
  __postForMock(mockOptions) {
@@ -303,7 +293,7 @@ class HttpService {
303
293
 
304
294
  let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
305
295
  if (containsHTML) {
306
- throw new Error("不安全的输入,请检查!");
296
+ throw new Error("不安全的输入,请检查!【" + str + "】");
307
297
  }
308
298
  }
309
299
 
@@ -341,7 +331,7 @@ class HttpService {
341
331
 
342
332
  let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
343
333
  if (containsHTML) {
344
- throw new Error("不安全的输入,请检查!");
334
+ throw new Error("不安全的输入,请检查!【" + str + "】");
345
335
  }
346
336
  }
347
337