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

Fixed, not yet flighted Issue #5742635

Details

Created
Dec 7, 2015
Privacy
This issue is public.
Reports
Reported by 2 people

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”

      Changed Assigned To from “Ben B.” to “Stanley H.”

      Changed Assigned To from “Stanley H.” to “Matthew C.”

      Changed Assigned To from “Matthew C.” to “Sirajudeen S.”

      Changed Status from “Confirmed” to “In code review”

      Changed Assigned To from “Sirajudeen S.” to “John J.”

      Changed Status from “In code review” to “Fixed”

      Changed Status from “Fixed” to “Fixed, not yet flighted”

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

    Sign in