Skip to content

Commit

Permalink
Pattern now matches fields with hyphens
Browse files Browse the repository at this point in the history
The original pattern will miss fields like 'content-length', which is used in Pleroma's signature.
  • Loading branch information
gudzpoz authored Nov 6, 2020
1 parent 98f27dc commit 3e1f462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ActivityPhp/Server/Http/HttpSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class HttpSignature
([\w\-\.#\/@]+)
)",
(algorithm="(?P<algorithm>[\w\s-]+)",)?
(headers="\(request-target\) (?P<headers>[\w\s]+)",)?
(headers="\(request-target\) (?P<headers>[\w\s-]+)",)?
signature="(?P<signature>[\w+\/]+={0,2})"
/x';

Expand Down

0 comments on commit 3e1f462

Please sign in to comment.