feat: Add Alibaba Cloud SMS Adapter (#6307)#8
Open
deepshekhardas wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/Utopia/Messaging/Adapter/SMS/AlibabaCloud.php">
<violation number="1" location="src/Utopia/Messaging/Adapter/SMS/AlibabaCloud.php:73">
P1: GET request parameters are being sent in the body instead of the query string, which can break Alibaba SMS signature validation.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| method: 'GET', | ||
| url: 'https://dysmsapi.aliyuncs.com', | ||
| headers: [], | ||
| body: $params |
There was a problem hiding this comment.
P1: GET request parameters are being sent in the body instead of the query string, which can break Alibaba SMS signature validation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/Utopia/Messaging/Adapter/SMS/AlibabaCloud.php, line 73:
<comment>GET request parameters are being sent in the body instead of the query string, which can break Alibaba SMS signature validation.</comment>
<file context>
@@ -0,0 +1,114 @@
+ method: 'GET',
+ url: 'https://dysmsapi.aliyuncs.com',
+ headers: [],
+ body: $params
+ );
+
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Alibaba Cloud SMS adapter.
Changes:
Summary by cubic
Adds an Alibaba Cloud SMS adapter to send templated SMS via Dysmsapi. Lets you send OTPs using your Aliyun sign name and template code.
New Features
AlibabaCloudusingSendSms(version2017-05-25) with HMAC-SHA1 signing and percent-encoding.cn-hangzhou.CodeisOK; returns per-recipient results.Migration
codeparam; pass the code as the SMScontent(adapter wraps it as{ "code": "<content>" }).Written for commit 076e6de. Summary will update on new commits.