View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020822 | mantisbt | bugtracker | public | 2016-04-18 06:45 | 2016-08-15 09:02 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | crash | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.19 | ||||
Target Version | 1.2.20 | Fixed in Version | 1.2.20 | ||
Summary | 0020822: Collapsing/Expanding sections triggers error 2300 | ||||
Description | On some platforms (e.g. Cloud9 IDE), collapsing/expanding a section and reloading the page causes APPLICATION ERROR 2300: Token could not be found. This prevents use of Mantis as it's no longer possible to load any page (the error is triggered in core.php, see call stack). <pre> | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
After investigation, it appears that the Cookie is set as follows on the client side: MANTIS_collapse_settings = "|relationships,0" However, on the server side it is retrieved as (note the missing ',0'): $_COOKIE['MANTIS_collapse_settings'] = "|relationships" Consequently, collapse_cache_token() does not detect this as a valid {section,value} pair and fails to touch the token since it does not exist. The ToggleDiv() function in common.js sets the cookie's value as t_cookie + "|" + p_div + ",1" (or ",0" for a collapsed section) Per RFC6265 section 4.1.1 [1] a comma is not a valid character in a cookie: |
|
In addition, the token_touch() call is incorrect: we give it a TOKEN_COLLAPSE token type, but the API actually expects a token ID, so collapse_cache_token() always tries to update token # 5 instead of the user's token. |
|
Backported to 1.2.x branch as the same problem exists there. |
|
MantisBT: master e3956c28 2016-04-18 03:24 Details Diff |
Use ':' as separator in collapse_settings cookie Previously we were using a comma, which is not a valid character in a cookie (per RFC6265 section 4.1.1 [1]). Fixes 0020822 [1] http://tools.ietf.org/html/rfc6265#section-4.2.1 [^] |
Affected Issues 0020822 |
|
mod - core/collapse_api.php | Diff File | ||
mod - js/common.js | Diff File | ||
MantisBT: master-1.2.x f8ea0a03 2016-04-18 03:24 Details Diff |
Use ':' as separator in collapse_settings cookie Previously we were using a comma, which is not a valid character in a cookie (per RFC6265 section 4.1.1 [1]). Fixes 0020822 [1] http://tools.ietf.org/html/rfc6265#section-4.2.1 [^] Backported from master e3956c28762877e041671427b59d24c927b08521 Conflicts: js/common.js |
Affected Issues 0020822 |
|
mod - core/collapse_api.php | Diff File | ||
mod - javascript/dev/common.js | Diff File |