mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Properly encode path components used to construct API URLs
Resolves #144 and similar potential issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
from six.moves.urllib.parse import quote
|
||||
|
||||
from .base_requests import AnymailRequestsBackend, RequestsPayload
|
||||
from ..exceptions import AnymailRequestsAPIError
|
||||
@@ -76,7 +77,7 @@ class SendinBluePayload(RequestsPayload):
|
||||
|
||||
def get_api_endpoint(self):
|
||||
if self.template_id:
|
||||
return "smtp/templates/%s/send" % self.template_id
|
||||
return "smtp/templates/%s/send" % quote(str(self.template_id), safe='')
|
||||
else:
|
||||
return "smtp/email"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user