Skip to content
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

.password protection not working completely #55

Open
AmirulAndalib opened this issue Jan 6, 2022 · 4 comments
Open

.password protection not working completely #55

AmirulAndalib opened this issue Jan 6, 2022 · 4 comments

Comments

@AmirulAndalib
Copy link

@cheems  when adding .password folder protection it doesnt work 100% when i search from the website and access to that folder it doesnt ask for password which is weird...

@AmirulAndalib
Copy link
Author

@cheems it would be helpful if you open a telegram support group ...

@xkoti
Copy link

xkoti commented Jan 6, 2022

@cheems it would be helpful if you open a telegram support group ...

I agree 👍

@AmirulAndalib
Copy link
Author

@menukaonline
Copy link
Owner

Yeah, I checked it out myself after you mentioned it previously and figured the problem out. There are several things that make it hard to find a better solution for this. The main reason for that is the way Google API's search option works. Unlike the way this index makes folder structures, Google API's search option returns a file/folder list that has the given search term in their file names. When Google API's search option returns a file list for the given search term, it will not consider any factor other than the given search term and will append any file found for that search term to the list needed to be returned.

Because of this behaviour, all the ideas I got in my mind to fix this issue become useless. At the first sight, I thought of writing a function that checks for a password file before letting the user access a folder from search results. But this will be useless because it is still possible for the files inside that password-protected folder to appear in the search results if the search term was matched with their file names. Because of that, users may still be able to access protected files.

Then I thought of writing a different function and providing a space for a protected folder id list. When a folder id is stored in this list, that folder will not be appeared in the search results. And also, the files inside the folder will not be appeared in search results because their parent folder id is in the protected folder list. (This can be possible because the parent id of a specific file can be found in its metadata) But this solution also fails because when the protected folder has subfolders, files inside those subfolders still can be present in search results. This happens because it is not possible to track files in sub levels when there are multiple levels in the folder structure.

After all, I ended up with a final solution. It is nothing but adding a feature to disable the search function.

But if we added all the ids of folders that are inside the protected folder to the protected folder list, then files inside those folders will not be appeared. But this is practically not a good solution when the protected folder consists of hundreds of subfolders.

Anyway, I will have a look into this problem and try to do something. But it may take several weeks because I'm busy with my studies this month. Probably I will be able to fix this within next month.


Even we had a telegram support group for this, I don't think that we would be able to see that much activity in the group. But anyway I will make one and mention it in the readme within next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants