I want to validate if the webhook was indeed from Appwrite and it works if the payload does not include special UTF-8 characters like ä,ü,ö etc. But when the payload includes these characters the hash/signature is diffrent...
I use C# for validateing the hash... here is the code:
string payload;
using var reader = new StreamReader(context.Request.InputStream, Encoding.UTF8);
payload = await reader.ReadToEndAsync();
string signature = _webHookUrl + payload.Trim();
string hash = Convert.ToBase64String(hMACSHA1.ComputeHash(Encoding.UTF8.GetBytes(signature)));
if (!context.Request?.Headers?.Get("x-appwrite-webhook-signature")?.Equals(hash) ?? true)
{
// Error hash is invalid
return;
}
Recommended threads
- Issue with downloading large files (40GB...
Hi everyone! I am using the latest Appwrite 1.8.0 version on my self-hosted server. I successfully uploaded a large ZIP archive (~40GB) using the chunked uploa...
- Firebase app import
I'm **very** new to appwrite and I just set up appwrite with docker and I'm trying to import a Firebase app I have set up but it's erroring and I don't really k...
- Console infinite loading behind NginxPro...
Hi All, I am trying to get AppWrite to work behind NPM. I've followed the Medium guide to set proper headers, I've added my proxy configuration to NPM, and I ...