Opened 15 years ago
Closed 15 years ago
#16975 closed defect (bug) (fixed)
JS autosave_update_slug() doesn't check if return is -1
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.2 | Priority: | lowest |
| Severity: | trivial | Version: | |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
If check_ajax_referer() fails, it'll die with -1. In autosave_update_slug(), we don't account for that, which results in a goofy -1 in the HTML.
See the example here: http://cl.ly/0Q341X010Z0c2H3s1R1I. Probably the most common reason for the check to fail would be if the user has since logged out, as you can see in the bottom right corner of the screenshot. I often see this when I discover tabs that I opened days before.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Patch looks good, just one question: wouldn't it be better to leave the current slug unchanged (whatever it may be) instead of removing it?