mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Ensure uri components are decoded (#11920)
This commit is contained in:
		
							parent
							
								
									2d4d1584fd
								
							
						
					
					
						commit
						187d98a153
					
				@ -109,9 +109,15 @@ export function useSearchEffect(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const params = location.search.substring(1).split("&");
 | 
					    const params = location.search.substring(1).split("&");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return params
 | 
					    const foundParam = params
 | 
				
			||||||
      .find((p) => p.includes("=") && p.split("=")[0] == key)
 | 
					      .find((p) => p.includes("=") && p.split("=")[0] == key)
 | 
				
			||||||
      ?.split("=");
 | 
					      ?.split("=");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (foundParam && foundParam.length === 2) {
 | 
				
			||||||
 | 
					      return [foundParam[0], decodeURIComponent(foundParam[1])];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return undefined;
 | 
				
			||||||
  }, [location, key]);
 | 
					  }, [location, key]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  useEffect(() => {
 | 
					  useEffect(() => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user