imay commented on a change in pull request #340: Fix bug of #307
URL: https://github.com/apache/incubator-doris/pull/340#discussion_r235618934
 
 

 ##########
 File path: be/src/http/download_action.cpp
 ##########
 @@ -254,7 +258,8 @@ Status DownloadAction::check_path_is_allowed(const 
std::string& file_path) {
 
 Status DownloadAction::check_log_path_is_allowed(const std::string& file_path) 
{
     DCHECK_EQ(_download_type, ERROR_LOG);
-    if (FileSystemUtil::contain_path(_error_log_root_dir, file_path)) {
+    std::string canonical_file_path = canonical(file_path).string();
+    if (FileSystemUtil::contain_path(canonical(_error_log_root_dir).string(), 
canonical_file_path)) {
 
 Review comment:
   `_error_log_root_dir` should be set after canonical when initializing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to