sendora 2.7.0__tar.gz → 2.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sendora-2.7.0 → sendora-2.7.1}/CHANGELOG.md +7 -0
- {sendora-2.7.0 → sendora-2.7.1}/PKG-INFO +1 -1
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_version.py +1 -1
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_webhooks.py +8 -1
- {sendora-2.7.0 → sendora-2.7.1}/.gitignore +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/LICENSE +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/README.md +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/pyproject.toml +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/__init__.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_account.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_answers.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_client.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_errors.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_json.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_keys.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_model.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_options.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_pages.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_retry.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_transport.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/_wire.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/py.typed +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/__init__.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/broadcasts.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/domains.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/email.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/erasures.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/inbound.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/inbound_domains.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/messages.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/server.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/servers.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/streams.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/suppressions.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/tokens.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/tracking_domains.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/tracking_opt_outs.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/resources/webhooks.py +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/skills/sendora/SKILL.md +0 -0
- {sendora-2.7.0 → sendora-2.7.1}/src/sendora/types.py +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.7.1
|
|
4
|
+
|
|
5
|
+
- `verify_webhook` takes the same whitespace around a part of the
|
|
6
|
+
`Sendora-Signature` header as the other SDKs do. It takes a byte order
|
|
7
|
+
mark, and no longer takes U+0085 or an ASCII separator. Every header
|
|
8
|
+
that Sendora sends verifies as before.
|
|
9
|
+
|
|
3
10
|
## 2.7.0
|
|
4
11
|
|
|
5
12
|
- A new error code, `daily_cap_reached`. An account can have a daily cap,
|
|
@@ -39,6 +39,13 @@ DEFAULT_TOLERANCE = 300
|
|
|
39
39
|
_SECONDS = re.compile(r"[0-9]{1,18}", re.ASCII)
|
|
40
40
|
_MAC = re.compile(r"[0-9a-fA-F]{64}", re.ASCII)
|
|
41
41
|
|
|
42
|
+
# What ECMAScript's trim() strips, as the TypeScript SDK does. A bare
|
|
43
|
+
# strip() also takes U+001C to U+001F and U+0085, and keeps U+FEFF.
|
|
44
|
+
_WHITESPACE = (
|
|
45
|
+
"\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006"
|
|
46
|
+
"\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff"
|
|
47
|
+
)
|
|
48
|
+
|
|
42
49
|
|
|
43
50
|
def verify_webhook(
|
|
44
51
|
body: bytes | str,
|
|
@@ -111,7 +118,7 @@ def _parsed(header: str | None) -> tuple[int, list[str]]:
|
|
|
111
118
|
macs: list[str] = []
|
|
112
119
|
for part in header.split(","):
|
|
113
120
|
name, separator, value = part.partition("=")
|
|
114
|
-
name, value = name.strip(), value.strip()
|
|
121
|
+
name, value = name.strip(_WHITESPACE), value.strip(_WHITESPACE)
|
|
115
122
|
if not separator or not name:
|
|
116
123
|
continue
|
|
117
124
|
if name == "t":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|