1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}