[PR #494] [CLOSED] Cookie hack #1599

Closed
opened 2026-02-25 22:40:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/floccusaddon/floccus/pull/494
Author: @pogoba
Created: 4/13/2020
Status: Closed

Base: developHead: cookie-hack


📝 Commits (10+)

  • 0b626af add demo of cookie container for NextcloudFolders
  • d5e3c8f remove print debugging
  • ca3a782 renameing things
  • 56df699 make it not crash on chrome
  • 545f170 Use fresh cookiejar for every sync
  • 8823b42 add destructor for unregistering listeners
  • 4bf3875 have a global AuthManager which deduplicates listeners
  • ee18c8d rename CookieManager.js -> ../AuthManager.js
  • 2b0b778 clean up memory under all circumstances
  • dfa3d48 clean up comments

📊 Changes

8 files changed (+447 additions, -67 deletions)

View changed files

📝 manifest.json (+1 -1)
src/lib/AuthManager.js (+324 -0)
📝 src/lib/Controller.js (+5 -0)
📝 src/lib/adapters/NextcloudFolders.js (+22 -4)
src/lib/api_versions.js (+22 -0)
📝 src/lib/browser-api.js (+1 -0)
📝 src/lib/interfaces/Adapter.js (+10 -0)
📝 src/test/test.js (+62 -62)

📄 Description

Keep auth cookies in a cookie jar which is seperated from the users cookie jar. Leads to nextcloud servers not having to verfifyPassword for each request.

@marcelklehr Please check especially Account.js and Controller.js if you are ok with what i changed. I only fixed a single test. I will fix the others as soon as you approve Account.js and Controller.js.

Working/Used test:
/dist/html/test.html?pw=admin-pass&server=https://192.168.178.117&grep=Floccus nextcloud-folders benchmark standard-root Account with two clients should handle deep hierarchies with lots of bookmarks

Test results:
with this patch (firefox): ~160000ms 170s
with this patch (chrome): ~90000ms 100s
without this patch (firefox): ~210000ms 255s


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/floccusaddon/floccus/pull/494 **Author:** [@pogoba](https://github.com/pogoba) **Created:** 4/13/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `cookie-hack` --- ### 📝 Commits (10+) - [`0b626af`](https://github.com/floccusaddon/floccus/commit/0b626af6ab9449bcbff49184d9dd46a9858ab584) add demo of cookie container for NextcloudFolders - [`d5e3c8f`](https://github.com/floccusaddon/floccus/commit/d5e3c8f36fcf5b45d36187aac1ba7eaff1674730) remove print debugging - [`ca3a782`](https://github.com/floccusaddon/floccus/commit/ca3a782a04c15c319ab57a27e84583f26534fde1) renameing things - [`56df699`](https://github.com/floccusaddon/floccus/commit/56df699ce7b06a8771c2a4f3390db564ed1f4253) make it not crash on chrome - [`545f170`](https://github.com/floccusaddon/floccus/commit/545f1706d353dadaa277a38cfe75f2a9078358f6) Use fresh cookiejar for every sync - [`8823b42`](https://github.com/floccusaddon/floccus/commit/8823b42a7493307ae0152297ac371d4766688aaf) add destructor for unregistering listeners - [`4bf3875`](https://github.com/floccusaddon/floccus/commit/4bf38758802ac88382fc71014fc7ace2b3391413) have a global AuthManager which deduplicates listeners - [`ee18c8d`](https://github.com/floccusaddon/floccus/commit/ee18c8d54f93eda74beb158ef4f108f8a9ce36f9) rename CookieManager.js -> ../AuthManager.js - [`2b0b778`](https://github.com/floccusaddon/floccus/commit/2b0b7787e3ba76572be371b793822f2d01f142ca) clean up memory under all circumstances - [`dfa3d48`](https://github.com/floccusaddon/floccus/commit/dfa3d48ae33e7ca00e53ea77ebf769f1ea1d19cb) clean up comments ### 📊 Changes **8 files changed** (+447 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `manifest.json` (+1 -1) ➕ `src/lib/AuthManager.js` (+324 -0) 📝 `src/lib/Controller.js` (+5 -0) 📝 `src/lib/adapters/NextcloudFolders.js` (+22 -4) ➕ `src/lib/api_versions.js` (+22 -0) 📝 `src/lib/browser-api.js` (+1 -0) 📝 `src/lib/interfaces/Adapter.js` (+10 -0) 📝 `src/test/test.js` (+62 -62) </details> ### 📄 Description Keep auth cookies in a cookie jar which is seperated from the users cookie jar. Leads to nextcloud servers not having to verfifyPassword for each request. @marcelklehr Please check especially Account.js and Controller.js if you are ok with what i changed. I only fixed a single test. I will fix the others as soon as you approve Account.js and Controller.js. Working/Used test: `/dist/html/test.html?pw=admin-pass&server=https://192.168.178.117&grep=Floccus nextcloud-folders benchmark standard-root Account with two clients should handle deep hierarchies with lots of bookmarks` Test results: with this patch (firefox): ~160000ms 170s with this patch (chrome): ~90000ms 100s without this patch (firefox): ~210000ms 255s --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 22:40:44 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#1599
No description provided.