-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Add a tus-js-client urlStorage implementation based on JS maps #31926
Comments
Hello @zulip/server-misc members, this issue was labeled with the "area: uploads" label, so you may want to check it out! |
@zulipbot claim |
Hello @devyk100! Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label. If this is your first time here, we recommend reading our guide for new contributors before getting started. |
@timabbott Can I take up this issue? |
@timabbott This is how I am thinking to implement this: The MapUrlStorage class uses JavaScript's Map to store and retrieve upload URLs for tus-js-client, following the required UrlStorage interface. Each upload is associated with a file's fingerprint, and a unique urlStorageKey is generated for each upload. This in-memory storage avoids using browser local storage, making it suitable for environments where local storage may raise security concerns. Sample code Snippet:
|
Fixes zulip#31926. The tus-js-client fingerprinting feature stores metadata on previously uploaded files in browser local storage, to allow resuming the upload / avoiding a repeat upload in future browser sessions. This is not a feature we need across browser sessions. Since these local storage entries are never garbage-collected, they can be accessed via the browser console even after logging out, and contain some metadata about previously uploaded files, which seems like a security risk for using Zulip on a public computer. We use our own implementation of url storage that saves urls in memory instead. We won't be able to retain this history across reloads unlike local storage, which is a tradeoff we are willing to make.
Fixes zulip#31926. The tus-js-client fingerprinting feature stores metadata on previously uploaded files in browser local storage, to allow resuming the upload / avoiding a repeat upload in future browser sessions. This is not a feature we need across browser sessions. Since these local storage entries are never garbage-collected, they can be accessed via the browser console even after logging out, and contain some metadata about previously uploaded files, which seems like a security risk for using Zulip on a public computer. We use our own implementation of url storage that saves urls in memory instead. We won't be able to retain this history across reloads unlike local storage, which is a tradeoff we are willing to make.
Fixes zulip#31926. The tus-js-client fingerprinting feature stores metadata on previously uploaded files in browser local storage, to allow resuming the upload / avoiding a repeat upload in future browser sessions. This is not a feature we need across browser sessions. Since these local storage entries are never garbage-collected, they can be accessed via the browser console even after logging out, and contain some metadata about previously uploaded files, which seems like a security risk for using Zulip on a public computer. We use our own implementation of url storage that saves urls in memory instead. We won't be able to retain this history across reloads unlike local storage, which is a tradeoff we are willing to make.
Fixes zulip#31926. This commit does not add highlighting to any pre-existing group mentions for which a user was part of the mentioned group via a subgroup. This only fixes it for mentions moving forward. Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20mention.20not.20highlighted/near/2008541
Fixes zulip#31926. The tus-js-client fingerprinting feature stores metadata on previously uploaded files by default in browser local storage. Since these local storage entries are never garbage-collected, they can be accessed via the browser console even after logging out, and contain some metadata about previously uploaded files, which seems like a security risk for using Zulip on a public computer. We use our own implementation of url storage that saves urls in memory instead. We won't be able to retain this history across reloads unlike local storage, which is a tradeoff we are willing to make.
As documented in https://github.com/tus/tus-js-client/blob/main/docs/api.md#urlstorage, it should be possible to instead of disabling this bit of
tusd
functionality, just provide a little module that uses JS maps to implement the API thattus-js-client
expects here, without using browser local storage and the security concerns that come with it.The text was updated successfully, but these errors were encountered: