New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item8611: A COMMENT gets applied again when a save is invoked from an afterSaveHandler

Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: CommentPlugin
Reported By: CrawfordCurrie
Waiting For:
Last Change By: KennethLavrsen
COMMENT uses the beforeSaveHandler to re-read the topic and insert the comment. It gets the comment from the URL params. But if we have the scenario where another plugin has an afterSaveHandler which saves a different topic, then the beforeSaveHandler in the CommentPlugin will end up inserting the comment again.

The workaround is for the calling plugin to ensure that any URL params are removed from the request before saving any further topics. The fix is for CommentPlugin to remove those same params after it has processed them once.

-- CrawfordCurrie - 24 Feb 2010


ItemTemplate edit

Summary A COMMENT gets applied again when a save is invoked from an afterSaveHandler
ReportedBy CrawfordCurrie
SVN Range
AppliesTo Engine
Component CommentPlugin
Priority Urgent
CurrentState Closed
Checkins distro:68c5c2951ea1
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r4 - 04 Oct 2010, KennethLavrsen - This page was cached on 21 Jun 2018 - 02:35.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy