File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/auth/src/platform_browser Expand file tree Collapse file tree 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 {
9191
9292 const authTokenSyncPath = getExperimentalSetting ( 'authTokenSyncURL' ) ;
9393 // 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 ( / ^ \/ [ ^ \/ ] . * / ) ) {
9696 const mintCookie = mintCookieFactory ( authTokenSyncPath ) ;
9797 beforeAuthStateChanged ( auth , mintCookie , ( ) =>
9898 mintCookie ( auth . currentUser )
You can’t perform that action at this time.
0 commit comments