Skip to content

Refactor Slack Chrome cookie decryption to use shared browser cookies package #139

Description

@priyanshujain

Summary

After the browser cookie extraction package is added at internal/browser/cookies/, the Slack desktop cookie extraction code at source/slack/desktop/cookies.go should be refactored to use the shared Chrome decryption functions instead of having its own copy.

Current state

source/slack/desktop/cookies.go has its own Chrome cookie decryption:

  • getKeychainPassword() - macOS Keychain access
  • decryptCookie() - AES-128-CBC with PBKDF2 key derivation
  • copyToTemp() - temp file copy to avoid browser locks

The new internal/browser/cookies/chrome.go package will have the same logic as a shared utility.

What to do

  • Update source/slack/desktop/cookies.go to import and use internal/browser/cookies
  • Remove the duplicated decryption functions from the Slack package
  • Keep Slack-specific logic (cookie paths, host filtering, xoxd token extraction)
  • Verify existing Slack tests still pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions