nextcloud / nextcloud/server

Protected namespace in localstorage

Open
#15,943 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2. developing developer experience enhancement feature: authentication feature: files
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.

https://github.com/nextcloud/server/blob/6f941a73a21ba926cca5b12ecab8242e34169d91/core/src/login.js#L32-L33

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.