プロジェクト

全般

プロフィール

Vote #77603

完了

Saving an empty Markdown image tag in Wiki pages causes internal server error

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
高め
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
121
issue_org_id:
23246
author_id:
90502
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
110
ステータス-->[Closed]

説明

Steps to reproduce:

  • use Markdown Wiki formatting
  • Create a Wiki page
  • Add an empty image tag, i.e.:
![]()
  • Save the changes
  • From now on, this page will show an internal server error, eventually also crashing the whole Redmine instance

The log shows the following error:

Started GET "/projects/fpga/wiki" for 127.0.0.1 at 2016-07-05 11:28:01 +0200
Processing by WikiController#show as HTML
  Parameters: {"project_id"=>"fpga"}
  Current user: viktor@foobar.com (id=17)
  Rendered wiki/_content.html.erb (9.7ms)
  Rendered wiki/show.html.erb within layouts/base (31.2ms)
Completed 500 Internal Server Error in 277ms (ActiveRecord: 23.1ms)

ActionView::Template::Error (undefined method `include?' for nil:NilClass):
    1: 
2: <%= textilizable content, :text, :attachments => content.page.attachments, 3: :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> 4:
lib/redmine/helpers/url.rb:26:in `uri_with_safe_scheme?' lib/redmine/wiki_formatting/markdown/formatter.rb:48:in `image' lib/redmine/wiki_formatting/markdown/formatter.rb:60:in `render' lib/redmine/wiki_formatting/markdown/formatter.rb:60:in `to_html' lib/redmine/wiki_formatting.rb:89:in `to_html' app/helpers/application_helper.rb:598:in `textilizable' app/views/wiki/_content.html.erb:2:in `_app_views_wiki__content_html_erb__2292234759012989548_70948640' app/views/wiki/show.html.erb:47:in `_app_views_wiki_show_html_erb___1795174084185801307_65213660' app/controllers/wiki_controller.rb:114:in `show' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

journals

At this point, the only way to solve this is delete this line directly from the database.
--------------------------------------------------------------------------------
Fixed in r15607, thanks for pointing this out.
--------------------------------------------------------------------------------
Wow, that was crazy fast! Applied this oneliner to our instance and I'm happy to confirm it indeed works now. Thanks a lot, Jean-Philippe.
--------------------------------------------------------------------------------
Thanks for your feedback.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

duplicates,Closed,23395,Markdown formatter crashes

Admin Redmine さんが3年以上前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン3.2.4_121 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0