S
S
Sergey Goryachev2018-11-24 23:51:02
JavaScript
Sergey Goryachev, 2018-11-24 23:51:02

Is it possible to pass a cookie through a link?

Through the plugin Jquery Cookie Plugin, a simple cookie is added to the site, for 90 days.
But the site also has subdomains.
Is it possible to transfer a cookie to a subdomain via a link like site.ru/?cookie=select (for example).
Or vice versa, if the first visit was to a subdomain, transfer it back. During the transition.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Troodi Larson, 2018-11-25
@troodi

Can. See if such a parameter is passed and set a cookie. Technically yes.

S
SagePtr, 2018-11-25
@SagePtr

It is possible if there is a script on the other side that sets the cookie according to the passed parameter. The only thing is that it is desirable to somehow encrypt or sign this parameter so that the attacker cannot set arbitrary cookies for arbitrary users through attacks like CSRF.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question