Patch #16781

Crash in markdown formatter causes ruby process to end

Added by Jens Krämer about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Text formatting
Target version:2.5.2

Description

We observed this behavior at Planio when invalid markdown syntax was input by the user, which caused an exception in the link callback declared in source:trunk/lib/redmine/wiki_formatting/markdown/formatter.rb because content was nil.

This exception seems to make the formatter instance unusable - the next time the formatter was used it crashed the whole ruby process. This seems to be related to this redcarpet issue.

The patch contains a test case and the (trivial) fix to take care of content==nil in #link.

fix_link_callback_exception.diff Magnifier (1.66 KB) Jens Krämer, 2014-04-30 10:38

Associated revisions

Revision 13122
Added by Jean-Philippe Lang about 4 years ago

Crash in markdown formatter causes ruby process to end (#16781).

Patch by Jens Krämer.

History

#1 Updated by Jens Krämer about 4 years ago

the patch...

#2 Updated by Toshi MARUYAMA about 4 years ago

  • Category set to Text formatting
  • Target version set to 2.5.2

#3 Updated by Jean-Philippe Lang about 4 years ago

  • Subject changed from crash in markdown formatter causes ruby process to end to Crash in markdown formatter causes ruby process to end
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang

Committed in r13122, thanks.

#4 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF