We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e8797b commit b5c208fCopy full SHA for b5c208f
2 files changed
.changeset/huge-walls-raise.md
@@ -0,0 +1,5 @@
1
+---
2
+'@faustwp/core': patch
3
4
+
5
+#2181 - Sanitize URL in cookie key to make it RFC 6265 sec 4.1.1 compliant.
packages/faustwp-core/src/server/auth/token.ts
@@ -25,7 +25,10 @@ export class OAuth {
25
26
constructor(cookies: Cookies) {
27
this.cookies = cookies;
28
- this.tokenKey = `${getWpUrl()}-rt`;
+ this.tokenKey = `${getWpUrl().replace(
29
+ /[^!#$%&'*+\-.^_`|~0-9A-Za-z]/g,
30
+ '',
31
+ )}-rt`; // Sanitize URL to make cookie key RFC 6265 sec 4.1.1 compliant.
32
}
33
34
public getRefreshToken(): string | undefined {
0 commit comments