Allow users to escape newlines in p8 certs#36
Open
peterferguson wants to merge 1 commit intoxmtp:mainfrom
Open
Allow users to escape newlines in p8 certs#36peterferguson wants to merge 1 commit intoxmtp:mainfrom
peterferguson wants to merge 1 commit intoxmtp:mainfrom
Conversation
nplasterer
approved these changes
Mar 27, 2024
Contributor
nplasterer
left a comment
There was a problem hiding this comment.
This seems like a fine fix to me. Just seeing if @zombieobject who is more familiar with iOS has any thoughts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When trying to deploy on fly I was facing an issue with the reading of the apns .p8 cert.
I couldn't find a good way to securely store the cert so it could be read in the application so that just leaves an env var.
However when you do the naive thing setting
APNS_P8_CERTIFICATEto the.p8file contents the server will fail with an error initingclient.Production()This pr allows the user to set the env by explicitly escaping the newlines:
If the
.p8cert isthen you can set the env var as follows
If I am just missing a better way to do this please let me know 🙏