-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ignoreUrl file setting property #123718
base: main
Are you sure you want to change the base?
Remove ignoreUrl file setting property #123718
Conversation
Urls may make the FileAccessTree invalid. This commit removes the flag for filtering urls, instead always filtering them.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
if (ignoreUrl) { | ||
result = result.filter(s -> s.toLowerCase(Locale.ROOT).startsWith("https://") == false); | ||
} | ||
result = result.filter(s -> s.toLowerCase(Locale.ROOT).startsWith("https://") == false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't rely on all setting rejecting http
, right? Shouldn't we make sure to exclude such urls as well, so we keep the filtetree clean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, one Q about removing different kind of URLs
Optional: would it make sense to have one or more tests that exercise resolvePaths
?
Either calling it directly, or indirectly via a FileAccessTree test?
if (ignoreUrl) { | ||
result = result.filter(s -> s.toLowerCase(Locale.ROOT).startsWith("https://") == false); | ||
} | ||
result = result.filter(s -> s.toLowerCase(Locale.ROOT).startsWith("https://") == false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we ignore all URLs? http://, ftp:// (if we even allow that thing).
Even file:// if passed down to FileAccessTree as is would make a mess of the path sting.
I agree we should be filtering all urls, but identifying arbitrary urls becomes much more complex. Right now these settings only support https, and they fail otherwise. Can we leave that as a followup? This PR is removing the ignoreUrl property, not changing the behavior of how we ignore urls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK to leave other URLs as a follow up
Urls may make the FileAccessTree invalid. This commit removes the flag for filtering urls, instead always filtering them.