Fix rentgen being fooled with a "=" in cookie value (e.g. the NID cookie on google.com)

This commit is contained in:
Kuba Orlik 2022-08-31 09:50:37 +02:00
parent e3d6e6b83c
commit e3f4f8858d

View File

@ -77,7 +77,7 @@ export function useEmitter(
export function parseCookie(cookie: string): Record<string, string> { export function parseCookie(cookie: string): Record<string, string> {
return cookie return cookie
.split(';') .split(';')
.map((l) => l.split('=')) .map((l) => [l.slice(0, l.indexOf('=')), l.slice(l.indexOf('=') + 1)])
.reduce( .reduce(
(acc, [key, value]) => ({ (acc, [key, value]) => ({
...acc, ...acc,