Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Please allow the import of cookies to a certain (temporary) container #163

Open
Binarus opened this issue Oct 29, 2023 · 4 comments

Comments

@Binarus
Copy link

Binarus commented Oct 29, 2023

At first, a big thanks for Cookie Quick Manager! Due to its support for containers, it is the best cookie manager extension I know of.

However, there is still a missing piece: We can export cookies from a certain context (container) into a file. But obviously, we cannot import cookies from a file into a certain context (container) on a different computer (that is, in a different Firefox installation or profile, respectively) (please correct me if I am wrong).

Background:

If we export cookies from a certain container into a file, there is a stanza like the following in every entry:

"Store raw": "firefox-container-10876",

I don't know where the number at the end comes from, but I know that it probably won't exist in the destination browser.

Please consider the following scenario: You open a website with Firefox in a container. The container gets automatically assigned a name (visible at the right side of the address bar) and an internal container number that is not visible anywhere. Let's say that the visible name is tmp100 and the container number is 10001. Now you open the same website at another PC in another container. That new container at the other PC gets the visible name tmp200 and the container number 11001.

Now you want to clone all cookies from the container at the first PC to the container at the other PC.

In this scenario, you can easily export the cookies from the respective source container; Cookie Quick Manager directly allows to search cookies from a certain context (container) and to export them to a file. Here, each entry in the file would contain a "Store raw": "firefox-container-10001", stanza.

Now, when importing that file at the other PC, it will try to import the cookies from the file into the container with number 10001. This goes wrong because a container with that number does not exist in the destination Firefox. I actually don't know what exactly happens in this situation, but I know for sure that it doesn't work. To make it work, we would have to follow two steps before importing the cookie file:

  1. Find out the container number of the destination container (based on its visible name) in the destination Firefox.
  2. Replace the container number in every entry in the cookie file by the number found in step 1.

I have tested this procedure, and it works.

However, this process is extremely annoying, the first part being the more problematic one. The only method to find out the container number for a certain container name: about:debugging -> find the correct storage for the temporary container extension -> click through every container object until you find the one with the correct visible name (in my case, it may be around 100 containers). Compared to that, replacing the source container number by the destination container number in the cookie file is a no-brainer.

In whole, the procedure outlined above sucks. Hence the question / feature request:

When importing a cookie file, could you please provide an option to import all of the cookies in the file into a certain context?

Thank you very much in advance for any comment or other action, and best regards,

Binarus

P.S. If there was an easier way to find out the container number of a certain contain temporary container, I would be grateful for any hint. It would mitigate a good part of the problem.

@ak2766
Copy link

ak2766 commented Nov 7, 2023

Yeah - I was testing out Evilginx and realized that I could not import select which container to import the cookies into. I had to install Cookie-Editor by cgagnier to get it to work.

@Binarus
Copy link
Author

Binarus commented Jan 2, 2025

@ak2766

In the meantime, I have tried Cookie-Editor as you suggested. But I couldn't make it do anything sensible at all. It always told me something like "Cookie Editor cannot manage the cookies for this site." (I have forgot the exact wording). This happened always, regardless of the actual site or container that was active at that point in time.

Could you please shortly describe what you exactly did to transfer cookies from one container to another container in a different Firefox installation / profile?

Thank you very much in advance!

@ak2766
Copy link

ak2766 commented Jan 2, 2025

Oh dear. It has been many moons since - 😬. For me, it wasn't about copying the cookies to a different tab as it is/was for you, but about being able to successfully save them in a format that Evilginx could read.

I came across your post when I was trying to determine why I couldn't get the cookies to work in Evilginx. Seeing that your problem seemed related to mine, I decided to try a different one, hence my post thinking it might resolve the issue for you too.

I'm not sure why you are unable to use Cookie-Editor - probably a conflict with another extension - maybe try in a new test profile (firefox -p) and see if you can get it working if it's the only installed extension.

@Binarus
Copy link
Author

Binarus commented Jan 11, 2025

@ak2766 Thanks a lot for your fast reply!

For me, it wasn't about copying the cookies to a different tab as it is/was for you, but about being able to successfully save them in a format that Evilginx could read.

That's a small misunderstanding. I don't want to copy the cookies to a different tab in the same Firefox installation / profile, but to a certain tab / container in a different Firefox installation at a different PC. This is possible by following the procedure that I have outlined in the first post. But that procedure obviously sucks.

Your hint regarding Cookie-Editor was valuable in any case, although it didn't work in my case (it seems to be broken in that it cannot be used as soon as (temporary) containers come into play). I didn't know it before.

Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants