mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: regression that caused Piefed (or potentially others) content to be dropped on receipt
This commit is contained in:
@@ -585,6 +585,9 @@ ActivityPub.checkHeader = async (url, timeout) => {
|
|||||||
.map(p => p.trim())
|
.map(p => p.trim())
|
||||||
.reduce((memo, cur) => {
|
.reduce((memo, cur) => {
|
||||||
cur = cur.split('=');
|
cur = cur.split('=');
|
||||||
|
if (cur.length < 2) {
|
||||||
|
cur.push('');
|
||||||
|
}
|
||||||
memo[cur[0]] = cur[1].slice(1, -1);
|
memo[cur[0]] = cur[1].slice(1, -1);
|
||||||
return memo;
|
return memo;
|
||||||
}, {});
|
}, {});
|
||||||
|
|||||||
Reference in New Issue
Block a user