SMF bug 479 (attachments potentially attached to the wrong post)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
SMF bug 479 (attachments potentially attached to the wrong post)
« on February 29th, 2012, 01:29 PM »
The issue in this bug is that if a page errors for any reason, any attachments made are saved after the initial submission and the details stored in session, but it's not specific - they're just generically in session, because browsers with multiple tabs just weren't around at the time, and as such it was never really so much of a problem.

Whatever fix SMF has, they've separated it out by board, which is workable but still susceptible to two topics in the same board exhibiting the same behaviour.

Possible solutions:
* only accept attachments AJAXively (e.g. to Media and return a media bbcode for it)
* when submitting, create a token for those attachments, and return that token with the form, such that the token has to be returned to get the attachments submitted. (All the other protections about orphaned attachments in session would need to be adapted but this is not a huge task)
Re: SMF bug 479 (attachments potentially attached to the wrong post)
« Reply #1, on August 23rd, 2013, 09:28 PM »
Actually, the more I think about it, the more I think AJAXively is the way to go. I've always wanted to use Aeva for attachments anyway, so combine that with the AJAX plugin Dragooon did, combined with a media browser (instead of a straight upload feature as the first thing) so people can reuse attachments easily and that would effectively nail everything.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial