Skip to content

Commit 584e9d4

Browse files
committed
sanitize user agent
1 parent eb9d90c commit 584e9d4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

electron/watchers/wakatime.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ export class Wakatime {
386386
const appNameSafe = appName.replace(/\s/g, "");
387387
const appVersion = appData?.version?.replace(/\s/g, "") || "unknown";
388388

389-
return `${appNameSafe}/${appVersion} ${this.versionString}`;
389+
return `${appNameSafe}/${appVersion} ${this.versionString}`.replace(
390+
/[\u{0080}-\u{FFFF}]/gu,
391+
"",
392+
);
390393
}
391394
}

0 commit comments

Comments
 (0)