From 7bc052b040bc6d9500207c502b2db900fbd7c471 Mon Sep 17 00:00:00 2001 From: "OWNEROR-41FNVD0\\lenovo" Date: Thu, 29 May 2025 09:57:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=20(=E6=A0=87=E8=AF=86):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20Privacy=20=E4=BB=93=E5=BA=93=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrivacyError/src/main/ets/pages/RunJavaScriptTrustList.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Privacy/PrivacyError/src/main/ets/pages/RunJavaScriptTrustList.ets b/Privacy/PrivacyError/src/main/ets/pages/RunJavaScriptTrustList.ets index 66f6f19f..e23a4444 100644 --- a/Privacy/PrivacyError/src/main/ets/pages/RunJavaScriptTrustList.ets +++ b/Privacy/PrivacyError/src/main/ets/pages/RunJavaScriptTrustList.ets @@ -17,7 +17,7 @@ struct WebComponent { Web({ src: $rawfile('index.html'), controller: this.controller }) .javaScriptAccess(true) .onPageEnd(e => { - let jsMethod: string = "alert(`xss`)" // 外部可控字段 + let jsMethod: string = "alert(`xss`)" // Externally controllable fields this.controller.runJavaScript(jsMethod) .then((result) => { console.log('result: ' + result); -- Gitee From 73df783317e61d45772dfa64c318cc7dc703e226 Mon Sep 17 00:00:00 2001 From: "OWNEROR-41FNVD0\\lenovo" Date: Thu, 29 May 2025 10:03:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=20(=E6=A0=87=E8=AF=86):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20Privacy=20=E4=BB=93=E5=BA=93=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry/src/main/ets/components/somePackage.ets | 1 + Privacy/privacy/src/main/ets/pages/Cybersecurity.cpp | 2 +- Privacy/privacy/src/main/ets/pages/NetworkTrust.ets | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AppAspectProgrammingDesign/entry/src/main/ets/components/somePackage.ets b/AppAspectProgrammingDesign/entry/src/main/ets/components/somePackage.ets index b7ba414d..4521792a 100644 --- a/AppAspectProgrammingDesign/entry/src/main/ets/components/somePackage.ets +++ b/AppAspectProgrammingDesign/entry/src/main/ets/components/somePackage.ets @@ -25,6 +25,7 @@ export class Test { // [End test] // [Start person] +// somePackage.ets export class Person { name: string; age: number; diff --git a/Privacy/privacy/src/main/ets/pages/Cybersecurity.cpp b/Privacy/privacy/src/main/ets/pages/Cybersecurity.cpp index 5ac7bb67..cda011cd 100644 --- a/Privacy/privacy/src/main/ets/pages/Cybersecurity.cpp +++ b/Privacy/privacy/src/main/ets/pages/Cybersecurity.cpp @@ -84,7 +84,7 @@ curl_easy_setopt( curl, CURLOPT_CATH, "/res/domainCaCert"); "pin": [ { "digest-algorithm": "sha256", - "digest": "g8CsdcpyAKxmLoWFvMd2hC7ZDUy7L4E2NYOi1i8qEtE=" //服务器证书公钥的hash + "digest": "g8CsdcpyAKxmLoWFvMd2hC7ZDUy7L4E2NYOi1i8qEtE=" // Hash of the server certificate public key } ] } diff --git a/Privacy/privacy/src/main/ets/pages/NetworkTrust.ets b/Privacy/privacy/src/main/ets/pages/NetworkTrust.ets index c63d9836..9036b249 100644 --- a/Privacy/privacy/src/main/ets/pages/NetworkTrust.ets +++ b/Privacy/privacy/src/main/ets/pages/NetworkTrust.ets @@ -45,7 +45,7 @@ const RemoteCommunicationKit = async () => { * 场景九:配置SSL Pinning证书锁定-Remote Communication Kit配置动态SSL Pinning */ // [Start rcp_ssl_pinning] - const keyHash: string = 'g8CsdcpyAKxmLoWFvMd2hC7ZDUy7L4E2NYOi1i8qEtE='; //服务器证书的公钥 + const keyHash: string = 'g8CsdcpyAKxmLoWFvMd2hC7ZDUy7L4E2NYOi1i8qEtE='; // Public key of the server certificate const session = rcp.createSession(); const request = new rcp.Request(HTTP_SERVER); const pin: rcp.CertificatePinning = { -- Gitee