Ticket #2881 (closed defect: fixed)
getCookie retrieves wrong value when name is a substring of multiple cookies
| Reported by: | guest | Owned by: | peller |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | General | Version: | 0.4.2 |
| Severity: | normal | Keywords: | |
| Cc: | pat@… |
Description
If you set two cookies "mycook" and "XXXmycook", then (depending on the order the cookies are set) getCookie('mycook') will return the value for "XXXmycook".
getCookie uses the following code which can match "mycook" and "XXXmycook": var idx = document.cookie.lastIndexOf(name+'=');
Attachments
Change History
Note: See
TracTickets for help on using
tickets.