efront 4.23.7 → 4.23.8
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.
- package/apps/pivot/cert/orders.xht +1 -2
- package/coms/basic/strings.js +1 -1
- package/coms/basic/strings_test.js +11 -0
- package/coms/pivot/acme2.js +20 -18
- package/coms/zimoli/field.js +2 -2
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/public/pivot/page/auth/login.txt +1 -1
- package/public/pivot/page/cert/main.txt +1 -1
- package/public/pivot/page/cert/orders.txt +1 -1
- package/public/pivot/page/cert/update.txt +1 -1
- package/public/pivot/page/db/act.txt +1 -1
- package/public/pivot/page/db/config.txt +1 -1
- package/public/pivot/page/db/edit.txt +1 -1
- package/public/pivot/page/db/list.txt +1 -1
- package/public/pivot//344/270/273/351/241/265.html +2 -2
package/coms/basic/strings.js
CHANGED
|
@@ -8,7 +8,6 @@ var escapeMap = {
|
|
|
8
8
|
"\u2028": "\\u2028",
|
|
9
9
|
"\u2029": "\\u2029",
|
|
10
10
|
};
|
|
11
|
-
var unescapeReg = new RegExp(`[${Object.keys(escapeMap).map(a => escapeMap[a]).join('')}]`, 'g');
|
|
12
11
|
var unescapeFun = a => escapeMap[a];
|
|
13
12
|
var unescapeUnc = function (a) {
|
|
14
13
|
if (escapeMap.hasOwnProperty(a)) return escapeMap[a];
|
|
@@ -27,6 +26,7 @@ var unescapeMap = {
|
|
|
27
26
|
"\\v": "\v",
|
|
28
27
|
};
|
|
29
28
|
for (var k in escapeMap) unescapeMap[escapeMap[k]] = k;
|
|
29
|
+
var unescapeReg = new RegExp(`[${Object.keys(escapeMap).map(a => escapeMap[a]).join('')}]`, 'g');
|
|
30
30
|
function encode(str, q = "\"", escapeUnicode = true) {
|
|
31
31
|
str = str.replace(new RegExp(`[\\\\${q}]`, 'g'), "\\$&");
|
|
32
32
|
if (escapeUnicode) str = str.replace(/[\r\n\t\v\f\u0008\u0000-\u001f\u007f-\uffff]/g, unescapeUnc);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function test_recode(a, b = a) {
|
|
2
|
+
assert(strings.recode(a), b);
|
|
3
|
+
}
|
|
4
|
+
test_recode(`"\v"`, `"\\u000b"`);
|
|
5
|
+
test_recode(`"\b"`, `"\\b"`);
|
|
6
|
+
test_recode(`"\f"`, `"\\f"`);
|
|
7
|
+
test_recode(`"\t"`, `"\\t"`);
|
|
8
|
+
test_recode(`"\r"`, `"\\r"`);
|
|
9
|
+
test_recode(`"\n"`, `"\\n"`);
|
|
10
|
+
test_recode(`"\0"`, `"\\u0000"`);
|
|
11
|
+
test_recode(`"\u0001"`, `"\\u0001"`);
|
package/coms/pivot/acme2.js
CHANGED
|
@@ -199,29 +199,29 @@ var acme2 = new class {
|
|
|
199
199
|
var acme2 = this;
|
|
200
200
|
var extra;
|
|
201
201
|
[private_key, public_key, extra] = unique.split(',');
|
|
202
|
-
if (extra) {
|
|
203
|
-
extra = JSON.parse(decodeUTF8(fromBase64(extra)));
|
|
204
|
-
acme2.email = extra.email;
|
|
205
|
-
acme2.kid = extra.kid;
|
|
206
|
-
if (extra.kid) {
|
|
207
|
-
var account = data.getUrlParamsForApi(accountApi, extra.kid);
|
|
208
|
-
acme2.aid = account.aid;
|
|
209
|
-
}
|
|
210
|
-
acme2.domain = extra.domain;
|
|
211
|
-
acme2.termsOfServiceAgreed = extra.termsOfServiceAgreed;
|
|
212
|
-
acme2.orders = extra.orders;
|
|
213
|
-
acme2.lastUpdateTime = filterTime(extra.lastUpdateTime, "y-MM-dd hh:mm");
|
|
214
|
-
acme2.nextUpdateTime = parseDate(extra.nextUpdateTime);
|
|
215
|
-
acme2.schadulePeriod = +extra.schadulePeriod || 80;
|
|
216
|
-
acme2.schaduleEnabled = extra.schaduleEnabled;
|
|
217
|
-
this.updateTime();
|
|
218
|
-
}
|
|
219
202
|
if (!this.enabled) {
|
|
220
203
|
public_key = null;
|
|
221
204
|
private_key = null;
|
|
222
205
|
return;
|
|
223
206
|
}
|
|
224
207
|
try {
|
|
208
|
+
if (extra) {
|
|
209
|
+
extra = JSON.parse(decodeUTF8(fromBase64(extra)));
|
|
210
|
+
acme2.email = extra.email;
|
|
211
|
+
acme2.kid = extra.kid;
|
|
212
|
+
if (extra.kid) {
|
|
213
|
+
var account = data.getUrlParamsForApi(accountApi, extra.kid);
|
|
214
|
+
acme2.aid = account.aid;
|
|
215
|
+
}
|
|
216
|
+
acme2.domain = extra.domain;
|
|
217
|
+
acme2.termsOfServiceAgreed = extra.termsOfServiceAgreed;
|
|
218
|
+
acme2.orders = extra.orders;
|
|
219
|
+
acme2.lastUpdateTime = filterTime(extra.lastUpdateTime, "y-MM-dd hh:mm");
|
|
220
|
+
acme2.nextUpdateTime = parseDate(extra.nextUpdateTime);
|
|
221
|
+
acme2.schadulePeriod = +extra.schadulePeriod || 80;
|
|
222
|
+
acme2.schaduleEnabled = extra.schaduleEnabled;
|
|
223
|
+
this.updateTime();
|
|
224
|
+
}
|
|
225
225
|
privateKey = await subtle.importKey("pkcs8", new Uint8Array(fromBase64(private_key)), {
|
|
226
226
|
name: RSASSA_PKCS1_v1_5,
|
|
227
227
|
hash: "SHA-256",
|
|
@@ -231,7 +231,9 @@ var acme2 = new class {
|
|
|
231
231
|
hash: "SHA-256",
|
|
232
232
|
}, true, ["verify"]);
|
|
233
233
|
acme2.public_key = public_key;
|
|
234
|
-
} catch (e) {
|
|
234
|
+
} catch (e) {
|
|
235
|
+
alert("加载服务器公钥异常!", "error");
|
|
236
|
+
}
|
|
235
237
|
}
|
|
236
238
|
pickUnique() {
|
|
237
239
|
var acme2 = this;
|
package/coms/zimoli/field.js
CHANGED
|
@@ -109,7 +109,7 @@ function main(elem) {
|
|
|
109
109
|
if (elem.break === false) elem.break = Infinity;
|
|
110
110
|
resizingList.set(elem, reshape);
|
|
111
111
|
elem.setAttribute("field", '');
|
|
112
|
-
elem.$digest =
|
|
112
|
+
elem.$digest = reshape;
|
|
113
113
|
elem.removeAttribute("tabindex");
|
|
114
114
|
|
|
115
115
|
if (!elem.childNodes.length) {
|
|
@@ -120,7 +120,7 @@ function main(elem) {
|
|
|
120
120
|
if (head) addClass(head, "head");
|
|
121
121
|
if (body) addClass(body, "body");
|
|
122
122
|
if (foot) addClass(foot, "foot");
|
|
123
|
-
elem.$renders = [reshape];
|
|
124
123
|
}
|
|
124
|
+
elem.$renders = [checkValue];
|
|
125
125
|
return elem;
|
|
126
126
|
}
|