1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-3226] Adding session to ReferenceEventRequest (#6114)

* Adding session to ReferenceEventRequest

* Added comment to regex
This commit is contained in:
aj-rosado
2023-08-30 21:27:26 +01:00
committed by GitHub
parent f61793b10b
commit 066056bd45
2 changed files with 8 additions and 0 deletions

View File

@@ -94,6 +94,13 @@ export class TrialInitiationComponent implements OnInit, OnDestroy {
if (this.referenceData.id === "") {
this.referenceData.id = null;
} else {
// Matches "_ga_QBRN562QQQ=value1.value2.session" and captures values and session.
const regex = /_ga_QBRN562QQQ=([^.]+)\.([^.]+)\.(\d+)/;
const match = document.cookie.match(regex);
if (match) {
this.referenceData.session = match[3];
}
}
}

View File

@@ -1,5 +1,6 @@
export class ReferenceEventRequest {
id: string;
session: string;
layout: string;
flow: string;
}