-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding checking for max expiriation date in IE driver cookie handling
Attempting to add a cookie with a very large expiration date caused the IE driver to crash because of overflows in the C++ standard library time formatting functions. This commit now avoids the crash by enforcing a maximum cookie expiration time of 2,147,483,647 (2^32 - 1) seconds from the time the cookie is attempting to be set. At the time of this writing (2019), that means an expiration of the cookie sometime over 68 years into the future (2087). If the intended expiration time is beyond that limit, the driver will now return "unable to set cookie" error. As an internal implementation detail, the driver is migrating from the "expires" attribute to the "max-age" attribute of the cookie string, as versions of IE below 9 are no longer supported. Additionally, while it would be possible to use "expires" and get a longer expiration time, (somewhere around the year 3000), the distinction between a cookie expiring after 68 years and one expiring in just under 1000 years is (or ought to be) largely meaningless in the context of a website. Fixes issue #7122.
- Loading branch information
Showing
7 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.