Protected namespace in localstorage
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Is your feature request related to a problem? Please describe.
Starting from version 16, Nextcloud deletes the complete local/sessionstorage. This can cause issues with different apps like ojsxc. I understand the intend to protect users privacy, but it would be nice if this could be configured by the app developer.
Describe the solution you'd like
Black or white list of prefixes which should be deleted or preserved. For example:
let prefixRegex = new RegExp('^' + prefix);
let keys = Object.keys(localStorage);
for (let key of keys) {
if (prefixRegex.test(key)) {
localStorage.removeItem(key);
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at core/src/login.js around lines 32-33, where Nextcloud clears localStorage and sessionStorage. Review how storage keys are removed and how an app-developer-configurable allowlist or blocklist would fit the existing login flow. Done means the requested prefixes are handled without breaking the privacy cleanup, with behavior covered by the relevant tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100