From 2347a01f7c6e0362c4c92081836c930d202dd9ff Mon Sep 17 00:00:00 2001 From: GOGOsu Date: Sat, 30 Apr 2022 10:42:59 +0800 Subject: [PATCH] Update aliyun-sms.js Add comments for the changed code. --- server/notification-providers/aliyun-sms.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/notification-providers/aliyun-sms.js b/server/notification-providers/aliyun-sms.js index 65843ebe..11575df3 100644 --- a/server/notification-providers/aliyun-sms.js +++ b/server/notification-providers/aliyun-sms.js @@ -92,6 +92,10 @@ class AliyunSMS extends NotificationProvider { let key = oa[i]; param2[key] = param[key]; } + + // Escape more characters than encodeURIComponent does. + // For generating Aliyun signature, all characters except A-Za-z0-9~-._ are encoded. + // See https://help.aliyun.com/document_detail/315526.html let moreEscapesTable = function (m) { return {