-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
White space in 'details' in PagerDuty is not parsed properly #1183
Comments
The plus is used by a lot of other plugins to mark a special keyword assignment to be a header change, or to allow Apprise to not lose it from the URL when it passes it along. I.e.: The above would allow Apprise to use the + as its own internal action to move what follows into the header. I don't think this is used for the plugin in question, but a global unquote plus may break this. I'm also curious how many people we could impact who got used to the It's a tricky, but very interesting edge case. I do see your issue though. |
Having a closer look at this, the error appears to be related to this flow application and the handling of the content you provide "before" it gets to Apprise. I don't see one reference to the Apprise library and it's functions itself in your shared example. |
Let me know your thoughts, but this issue you brought forth is not Apprise. There is some data manipulation taking place between the flow interface you're using and the underlining Apprise library. Will close this issue if i don't hear back in a month |
Hey @caronc , Sorry for not getting back to you sooner. I debug this on my side and the data is being change once it was passed to apprise. Also, this is where prefect wrap the apprise plugin with their own class https://github.com/PrefectHQ/prefect/blob/aea34fd415bdb2a2edb94a06c572d0e0e0b830fc/src/prefect/blocks/notifications.py#L164 . As far as I can tell, they just passed the parameters to the Apprise plugin, but let me check again. |
You may not be wrong, but the link you shared appears to just be the object initialization. I don't see where the code is being called. It's a call to |
I will close this ticket soon if i don't hear anything further; i can confirm this is an upstream issue not an issue with Apprise. |
📣 Notification Service(s) Impacted
PagerDuty
🐞 Describe the bug
The details PagerDuty parameter is not being parsed properly and the space in the resulting message is changed into + sign.
The root cause of this is that we run
urllib.parse.urlencode
to details using the default values which encode the space character to+
sign instead of%20
. We then runurllib.parse.unquote
to the details which expects %20 for spaces instead of + sign.Either we change how we encode the details or use
urllib.parse.unquote_plus
when decoding the url parameters.Happy to make the PR if the problem make sense.
💡 Screenshots and Logs
We are sending the alert via Prefect integration which uses appraise plugin:
We get this result in PagerDuty
💻 Your System Details:
🔮 Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: