[PR #50] [MERGED] Fix handling of cookies for absolute domains #58

Closed
opened 2026-03-23 20:32:17 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tubearchivist/browser-extension/pull/50
Author: @chrisliebaer
Created: 11/26/2024
Status: Merged
Merged: 1/28/2025
Merged by: @bbilly1

Base: masterHead: master


📝 Commits (1)

  • 0c6c4f2 Fix handling of cookies for absolute domains

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 extension/background.js (+4 -1)

📄 Description

As mentioned in #42, other extensions might introduce additional cookies into the youtube.com cookie space. There appears to be a difference between cookies which are readable from subdomains and cookies which can only be read from the domain that set it. The actual cookies set by YouTube all include subdomains, but the one set by Cookie AutoDelete does not.

This causes the Python cookie file loader to fail, since it expects domains starting with a dot to match the subdomain flag (2nd flag in cookie file): github.com/python/cpython@f46d847574/Lib/http/cookiejar.py (L2050-L2051)

I couldn't figure out, which exact format is represented here, but this commit fixes the browser plugin to respect the wishes of the underlying Python cookie jar.

Closes #42


🔄 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/tubearchivist/browser-extension/pull/50 **Author:** [@chrisliebaer](https://github.com/chrisliebaer) **Created:** 11/26/2024 **Status:** ✅ Merged **Merged:** 1/28/2025 **Merged by:** [@bbilly1](https://github.com/bbilly1) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`0c6c4f2`](https://github.com/tubearchivist/browser-extension/commit/0c6c4f2cf4a0a0ab1261585e78543425a15bd382) Fix handling of cookies for absolute domains ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `extension/background.js` (+4 -1) </details> ### 📄 Description As mentioned in #42, other extensions might introduce additional cookies into the `youtube.com` cookie space. There appears to be a difference between cookies which are readable from subdomains and cookies which can only be read from the domain that set it. The actual cookies set by YouTube all include subdomains, but the one set by Cookie AutoDelete does not. This causes the Python cookie file loader to fail, since it expects domains starting with a dot to match the subdomain flag (2nd flag in cookie file): https://github.com/python/cpython/blob/f46d8475749a0eadbc1f37079906a8e1ed5d56dc/Lib/http/cookiejar.py#L2050-L2051 I couldn't figure out, which exact format is represented here, but this commit fixes the browser plugin to respect the wishes of the underlying Python cookie jar. Closes #42 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 20:32:17 +00: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
tubearchivist/archived-browser-extension#58
No description provided.