@evanp/activitypub-bot 0.28.5 → 0.28.6
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.
- package/lib/httpsignature.js +5 -3
- package/package.json +1 -1
package/lib/httpsignature.js
CHANGED
|
@@ -176,11 +176,13 @@ export class HTTPSignature {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
#parseSignatureHeader (signature) {
|
|
179
|
-
const parts = signature.
|
|
179
|
+
const parts = signature.match(/\w+="[^"]*"/g)
|
|
180
180
|
const params = {}
|
|
181
181
|
for (const part of parts) {
|
|
182
|
-
const
|
|
183
|
-
|
|
182
|
+
const eq = part.indexOf('=')
|
|
183
|
+
const key = part.slice(0, eq)
|
|
184
|
+
const value = part.slice(eq + 2, -1)
|
|
185
|
+
params[key] = value
|
|
184
186
|
}
|
|
185
187
|
return params
|
|
186
188
|
}
|