Link, ClickAction Https Validation, before request.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza en WebpushFcmOptions.CopyAndValidate, el punto de entrada de validación mostrado en el issue, y compara su comportamiento con AndroidNotification.ClickAction. Confirma con los mantenedores si deben aceptarse enlaces HTTP o si la validación debe ser configurable; se considera terminado cuando el comportamiento acordado esté implementado y cubierto por las pruebas de mensajería pertinentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[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}");
- Lenguaje dominante
- C#
- Estrellas
- 408
- Forks
- 147
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de firebase/firebase-admin-dotnet
-
AbstractFirebaseAuth.cs has a typo (accound/account)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoneeds-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
firebase/firebase-admin-dotnet#334 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
GetProjectId returns null on Compute Engine / Cloud Run with application default credentialsPosiblemente ocupada @lahirumaramba la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
firebase/firebase-admin-dotnet#588 ·
Los mantenedores suelen responder en 1 día
-
Sending FCM notification with Fids Return NotRegisteredQuizá libre de nuevo @yvonnep165 la tomó hace 78 días y no hay ningún pull request abierto. Abierto
firebase/firebase-admin-dotnet#534 · 5 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Sending MulticastMessage does not work after replacing Tokens with FidsQuizá libre de nuevo @Doris-Ge la tomó hace 106 días y no hay ningún pull request abierto. Abiertoapi: messaging
firebase/firebase-admin-dotnet#530 · 2 comentarios · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
firebase/firebase-admin-dotnet#526 ·
Los mantenedores suelen responder en 1 día
Todos los issues de firebase/firebase-admin-dotnet
Issues similares
-
VB -> C#
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
icsharpcode/CodeConverter#1301 ·
Los mantenedores suelen responder en 3 días
-
PettingZoo wrappers send only the first action component to every action dimensionPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Unity-Technologies/ml-agents#6341 ·
Los mantenedores suelen responder en 1 día
-
Area: World-Readiness
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
microsoft/calculator#2522 ·
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Sonarr/Sonarr#9274 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
mailto support for hyperlinkAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100