Browse Source
			
			
			Merge pull request #3704 from BlackDex/remove-debug-code
			
				Remove debug code during attachment download
			
			
				pull/3715/head
			
			
				1.29.1
			
		 
		
			
				
					
						 Daniel García
					
					2 years ago
						Daniel García
					
					2 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/api/web.rs
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -94,7 +94,7 @@ async fn web_files(p: PathBuf) -> Cached<Option<NamedFile>> { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | #[get("/attachments/<uuid>/<file_id>?<token>")] |  |  | #[get("/attachments/<uuid>/<file_id>?<token>")] | 
			
		
	
		
		
			
				
					|  |  | async fn attachments(uuid: SafeString, file_id: SafeString, token: String) -> Option<NamedFile> { |  |  | async fn attachments(uuid: SafeString, file_id: SafeString, token: String) -> Option<NamedFile> { | 
			
		
	
		
		
			
				
					
					|  |  |     let Ok(claims) = dbg!(decode_file_download(&token)) else { return None }; |  |  |     let Ok(claims) = decode_file_download(&token) else { return None }; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |     if claims.sub != *uuid || claims.file_id != *file_id { |  |  |     if claims.sub != *uuid || claims.file_id != *file_id { | 
			
		
	
		
		
			
				
					|  |  |         return None; |  |  |         return None; | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | 
 |