organizerconnect / django-bouncy Goto Github PK
View Code? Open in Web Editor NEWA Django package used to process bounce and abuse reports from AWS Simple Email Service
License: Other
A Django package used to process bounce and abuse reports from AWS Simple Email Service
License: Other
I've started receiving verification failures.
After comparing the NOTIFICATION_HASH_FORMAT
at
django-bouncy/django_bouncy/utils.py
Line 36 in 773a581
Here are the fields per the docs:
Message
MessageId
Subject (if included in the message)
Timestamp
TopicArn
Type
and an example per the docs:
Message
My Test Message
MessageId
4d4dc071-ddbf-465d-bba8-08f81c89da64
Subject
My subject
Timestamp
2019-01-31T04:37:04.321Z
TopicArn
arn:aws:sns:us-east-2:123456789012:s4-MySNSTopic-1G1WEFCOXTC0P
Type
Notification
This is the current template used by bouncy:
NOTIFICATION_HASH_FORMAT = u'''Message
{Message}
MessageId
{MessageId}
Timestamp
{Timestamp}
TopicArn
{TopicArn}
Type
{Type}
'''
Notice it does not include the subject.
The setUpClass method calls the super class method but tearDownClass does not. It would be easier for reusable testing if it did
The logger call for Verification Failure is missing the string format argument at
django-bouncy/django_bouncy/views.py
Line 100 in 773a581
With the recent changes that have been merged to this project, could we have a new version released to PyPI?
I am currently running django-bouncy 0.2.8, and am having problems specifically when an email bounces in French.
Verification succeeds in English without issues, and the rest of my codebase further processes the new Bounce
record properly. However when the initial email is sent in French, the bounce fails. Currently the message from django-bouncy is just "Verification failed %s".
I've contacted AWS support, and they confirmed that their SNS subscription does not have its message content altered in any way based on language settings. They suggested I come here to raise an issue. I've also pulled in 0.2.8 source as an installed app in my Django backend in order to add extra logging to debug via Sentry, and I get the following error: [('rsa routines', 'int_rsa_verify', 'bad signature')]
. This happens in the except clause when trying crypto.verify()
within the utils.verify_notification
function.
From what I can see in Sentry, the certificate retrieved is identical in both languages, so I suspect somehow data isn't being escaped properly in French and the hashes aren't matching up.
Do you have any insight as to what might be causing this?
Recently, I have installed django-bouncy pip and tried to handle bouncy.
But I cannot confirm subscription from Amazon SNS.
I subscribed https api endpoint to Amazon SNS topic and shows pending confirmation forever.
How can I check if bouncy api works properly in my app?
Hi,
Is there a reason for deleting the old 0.2.6 from pypi repo?
It is pretty much standard that packages keep old versions available on pypi so current projects can still be installed without needing to upgrade to the latest version of every package.
I have recently observed notifications are sent with the key eventType
instead of notificationType
. The SES docs still state to expect notificationType
per https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html
However, I've found other issues related to the problem:
An interesting comment at mautic/mautic#8903 (comment):
If you are using a SES Configuration Set (by setting the custom mail header X-SES-CONFIGURATION-SET), the bounce event generated by SES is slightly different than if you configure bounce management globally. In fact, the difference is just a JSON key. It is eventType instead of notificationType.
We are using the X-SES-CONFIGURATION-SET
header. As such, it seems like we need to support both.
The simplest solution seems to be copying eventType
to notificationType
if notificationType
is not set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.