|  | @@ 344-350 (lines=7) @@ | 
                                                            
                                    | 341 |  | 		try { | 
                                                            
                                    | 342 |  | 			$share = $this->shareManager->getShareByToken($shareToken); | 
                                                            
                                    | 343 |  | 			// not authenticated ? | 
                                                            
                                    | 344 |  | 			if($share->getPassword()){ | 
                                                            
                                    | 345 |  | 				if (!$this->session->exists('public_link_authenticated') | 
                                                            
                                    | 346 |  | 					|| $this->session->get('public_link_authenticated') !== (string)$share->getId() | 
                                                            
                                    | 347 |  | 				) { | 
                                                            
                                    | 348 |  | 					throw new \Exception('Invalid password'); | 
                                                            
                                    | 349 |  | 				} | 
                                                            
                                    | 350 |  | 			} | 
                                                            
                                    | 351 |  |  | 
                                                            
                                    | 352 |  | 			$node = $share->getNode(); | 
                                                            
                                    | 353 |  | 			if($node instanceof Folder) { | 
                                                                                
                                |  | @@ 403-409 (lines=7) @@ | 
                                                            
                                    | 400 |  | 		try { | 
                                                            
                                    | 401 |  | 			$share = $this->shareManager->getShareByToken($shareToken); | 
                                                            
                                    | 402 |  | 			// not authenticated ? | 
                                                            
                                    | 403 |  | 			if($share->getPassword()){ | 
                                                            
                                    | 404 |  | 				if (!$this->session->exists('public_link_authenticated') | 
                                                            
                                    | 405 |  | 					|| $this->session->get('public_link_authenticated') !== (string)$share->getId() | 
                                                            
                                    | 406 |  | 				) { | 
                                                            
                                    | 407 |  | 					throw new \Exception('Invalid password'); | 
                                                            
                                    | 408 |  | 				} | 
                                                            
                                    | 409 |  | 			} | 
                                                            
                                    | 410 |  |  | 
                                                            
                                    | 411 |  | 			$node = $share->getNode(); | 
                                                            
                                    | 412 |  | 			if ($filePath !== null) { |