gtenev commented on a change in pull request #6880:
URL: https://github.com/apache/trafficserver/pull/6880#discussion_r446268241



##########
File path: proxy/http/remap/PluginFactory.cc
##########
@@ -259,6 +272,15 @@ PluginFactory::findByEffectivePath(const fs::path &path, 
bool dynamicReloadEnabl
   return PluginDso::loadedPlugins()->findByEffectivePath(path, 
dynamicReloadEnabled);
 }
 
+bool
+PluginFactory::isGlobalPluginDSOEnabled(const fs::path &path) const
+{
+  const auto found = std::find_if(std::begin(this->optoutPlugins), 
std::end(this->optoutPlugins),
+                                  [&path](const auto &info) { return 
info.fullPath == path; });

Review comment:
       Are we sure that `info.fullPath` is a [canonical 
path](https://en.cppreference.com/w/cpp/filesystem/canonical) 
([realpath](https://man7.org/linux/man-pages/man3/realpath.3.html))? If not 
this would not work as expected. `path` in this case is referenced as 
"effective path" all across the new remap plugin reloading infrastructure 
(PluginFactory, PluginDSO, etc.), it is always a canonical path since it was 
meant to be unique and used as a key in searches.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to