Can't use addCookie when the domain has a leading dot

Confirmed Issue #5742635 • Assigned to Ben B.

Details

Created
Dec 7, 2015
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Execute the following code:

driver.Navigate().GoToUrl(

http://www.msn.com

);

this

.driver.Manage().Cookies.AddCookie(

new

Cookie

(

“TestCookie”

,

“yes”

,

“.msn.com”

,

“/”

,

null

));

NOTICE: we throw an exception that we could not add a cookie

EXPECT: I think we should be able to add cookies here. Chrome and Firefox both can.

If you remove the leading dot from the domain (eg:

driver.Navigate().GoToUrl(

http://www.msn.com

);

this

.driver.Manage().Cookies.AddCookie(

new

Cookie

(

“TestCookie”

,

“yes”

,

“msn.com”

,

“/”

,

null

));

then it works as expected, so we may have some security check in place, but I don’t think we need it

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To from “Mara P.” to “Ben B.”

      Changed Status to “Confirmed”

      Changed Title from “cannot use addCookie when the domain has a leading dot” to “cannot use addCookie when the domain has a leading dot”

      Changed Title from “cannot use addCookie when the domain has a leading dot” to “Can't use addCookie when the domain has a leading dot”

    You need to sign in to your Microsoft account to add a comment.

    Sign in