File tree 2 files changed +7
-2
lines changed
packages/auth/src/platform_browser
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @firebase/auth ' : patch
3
+ ---
4
+
5
+ Do not allow double slash at beginning of authTokenSyncURL. (follow-up fix to https://github.com/firebase/firebase-js-sdk/pull/8056 )
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
91
91
92
92
const authTokenSyncPath = getExperimentalSetting ( 'authTokenSyncURL' ) ;
93
93
// Don't allow urls (XSS possibility), only paths on the same domain
94
- // (starting with '/')
95
- if ( authTokenSyncPath && authTokenSyncPath . startsWith ( '/' ) ) {
94
+ // (starting with a single '/')
95
+ if ( authTokenSyncPath && authTokenSyncPath . match ( / ^ \/ [ ^ \/ ] . * / ) ) {
96
96
const mintCookie = mintCookieFactory ( authTokenSyncPath ) ;
97
97
beforeAuthStateChanged ( auth , mintCookie , ( ) =>
98
98
mintCookie ( auth . currentUser )
You can’t perform that action at this time.
0 commit comments