-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Make sure we don't scan files that can not be accessed #1972
Conversation
@nickvergessen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @DeepDiver1975 and @butonic to be potential reviewers. |
|
I will fix that, once @icewind1991 confirmed this is the way to go. |
@@ -132,6 +132,24 @@ protected function getData($path) { | |||
*/ | |||
public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true) { | |||
|
|||
if (!\OC::$server->getDatabaseConnection()->supports4ByteText()) { |
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.
Can't we reuse the fragment from somewhere else (View
?) and just call that
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.
That was exactly what I wondered aswell, but I think the cache is inside the view, so this looks shitty from dependency pov. But should we just move it to a separate helper or something?
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.
@icewind1991 should we simply move all the checks from the View into IStorage::verifyPath
and in the view then simply resolve the path to the storage and call the method?
7dcfb6f
to
682307c
Compare
@icewind1991 moved the validation from view to storage so it's in one place only |
682307c
to
00fbb5b
Compare
Tested and works 👍 @rullzer @icewind1991 Please review :) |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
00fbb5b
to
558f169
Compare
Fine by me 👍 But lets have our fs guru have the last vote. Summoning @icewind1991 |
👍 |
@nickvergessen Could you open the backport PR? Thanks |
Steps
files:scan admin
With this fix the file is not added on scanning.
@icewind1991 @MorrisJobke @LukasReschke
Fix #1965