Fix double forward slash in auth callback (#2197)
Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
		
							parent
							
								
									94f6c80d57
								
							
						
					
					
						commit
						ae27601405
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -59,9 +59,10 @@ export default function Login({ | |||
| 
 | ||||
|   const telemetry = useTelemetry(); | ||||
| 
 | ||||
|   let callbackUrl = typeof router.query?.callbackUrl === "string" ? router.query.callbackUrl : "/"; | ||||
|   let callbackUrl = typeof router.query?.callbackUrl === "string" ? router.query.callbackUrl : ""; | ||||
| 
 | ||||
|   // If not absolute URL, make it absolute
 | ||||
|   if (/"\//.test(callbackUrl)) callbackUrl = callbackUrl.substring(1); | ||||
|   if (!/^https?:\/\//.test(callbackUrl)) { | ||||
|     callbackUrl = `${WEBSITE_URL}/${callbackUrl}`; | ||||
|   } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Demian Caldelas
						Demian Caldelas