Link, ClickAction Https Validation, before request.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại WebpushFcmOptions.CopyAndValidate, điểm vào của việc xác thực được nêu trong issue, và so sánh hành vi của nó với AndroidNotification.ClickAction. Xác nhận với các maintainer xem có nên chấp nhận các liên kết HTTP hay việc xác thực nên có thể cấu hình hay không; được coi là hoàn tất khi hành vi đã thống nhất được triển khai và được bao phủ bởi các bài kiểm thử messaging liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[REQUIRED] Step 2: Describe your environment
- Operating System version: x64
- Firebase SDK version: 2.3.0
- Firebase Product: Cloud Messaging
- .NET version: .NET 6.0
- OS: Win10
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
I trying to send a push messaage with:
-Webpush data (FcmOptions.Link)
-Android data (Notification.ClickAction)
Link and ClickAction same, this is http links, not https, because this is my local development enviroment.
When i developing i want to send messages with http links that pointing on my local circuit wtihout https.
Before message sends, it's validating, and validation checks link only in webpush, Android click action does not checks, and if link not https throws exception with mesage:
System.ArgumentException: 'The link options should be a valid https url.'

I want to have a opportunity to disable this validation, but in best case scenario remove this validation from code, beacause i dowloaded source code, and used it instead of package, after removing https checks, and FCM succeffully processed this message, when i got it and clicked on message, my browser successfully opened on http - link.
this place in source code:
using System;
using Newtonsoft.Json;
namespace FirebaseAdmin.Messaging
{
public sealed class WebpushFcmOptions
{
[JsonProperty("link")]
public string Link { get; set; }
internal WebpushFcmOptions CopyAndValidate()
{
var copy = new WebpushFcmOptions()
{
Link = this.Link,
};
if (copy.Link != null)
{
// this https validation, that i want to remove
if (!Uri.IsWellFormedUriString(copy.Link, UriKind.Absolute) || !copy.Link.StartsWith("https"))
{
throw new ArgumentException("The link options should be a valid https url.");
}
}
return copy;
}
}
}
Relevant Code:
using FirebaseAdmin;
using FirebaseAdmin.Messaging;
using Google.Apis.Auth.OAuth2;
var credential = GoogleCredential.FromFile("private-key.json");
FirebaseApp.Create(new AppOptions()
{
Credential = credential
});
var registrationToken = "CLIENT_TOKEN_HERE";
var message = new Message()
{
Token = registrationToken,
Notification = new Notification()
{
Title = "Test title.",
Body = "Test body.",
},
Webpush = new WebpushConfig()
{
FcmOptions = new WebpushFcmOptions()
{
// http link that will be cheked
Link = "http://127.0.0.1:5173"
}
},
Android = new AndroidConfig()
{
Notification = new AndroidNotification()
{
// this will not checked
ClickAction = "http://127.0.0.1:5173"
}
}
};
var response = await FirebaseMessaging.DefaultInstance.SendAsync(message);
Console.WriteLine($"Successfully send message to {response}");
- Ngôn ngữ chính
- C#
- Star
- 407
- Fork
- 147
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-dotnet
-
AbstractFirebaseAuth.cs has a typo (accound/account)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởneeds-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
firebase/firebase-admin-dotnet#334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
firebase/firebase-admin-dotnet#591 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GetProjectId returns null on Compute Engine / Cloud Run with application default credentialsCó thể đã có người làm @lahirumaramba đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
firebase/firebase-admin-dotnet#588 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sending FCM notification with Fids Return NotRegisteredCó thể làm lại được @yvonnep165 đã nhận 81 ngày trước và không có pull request nào đang mở. Đang mở
firebase/firebase-admin-dotnet#534 · 5 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sending MulticastMessage does not work after replacing Tokens with FidsCó thể làm lại được @Doris-Ge đã nhận 109 ngày trước và không có pull request nào đang mở. Đang mởapi: messaging
firebase/firebase-admin-dotnet#530 · 2 bình luận · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-admin-dotnet
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Facepunch/sbox-public#12305 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
分享 JVC DVD+RW 4.7G (铼德代工) 实测标定预设Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#205 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug keep-fresh
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Flow-Launcher/Flow.Launcher#4744 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
flyingpie/windows-terminal-quake#419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Show the per-model weekly limitĐang mởenhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100