プロジェクト

全般

プロフィール

Defect #1173

完了

Missing User Agent leads to error 500

Björn Peemöller さんが11年以上前に追加. 約11年前に更新.

ステータス:
終了(Closed)
優先度:
通常(Normal)
担当者:
対象バージョン:
開始日:
2013/01/18
期日:
進捗率:

100%

予定工数:

説明

I had an request to an issue page from a user which did not transfer his HTTP_USER_AGENT.

In consequence, the wiki-extensions plugin lead to an error 500 because of the following error:

ERROR MESSAGE:

NoMethodError: undefined method `match' for nil:NilClass

WHERE:

issues#show

[PROJECT_ROOT]/plugins/redmine_wiki_extensions/lib/wiki_extensions_helper_patch.rb:63

[PROJECT_ROOT]/plugins/redmine_wiki_extensions/lib/wiki_extensions_helper_patch.rb:36

[PROJECT_ROOT]/lib/redmine/wiki_formatting/textile/helper.rb:23

[PROJECT_ROOT]/app/views/issues/_edit.html.erb:31

...

Looking at wiki_extensions_helper_patch.rb:61- 64, I see:

  def ie6_or_ie7?
    useragent = request.env['HTTP_USER_AGENT']
    return useragent.match(/IE[ ]+[67]./) != nil
  end

So it might be useful to change line 62 to

useragent = request.env['HTTP_USER_AGENT'].to_s

or something similar (I'm no Ruby expert).

Haru Iida さんが11年以上前に更新

  • プロジェクトr-labs から Wiki Extensions に変更
  • 担当者Haru Iida にセット
  • 対象バージョン0.6.2 にセット

Haru Iida さんが11年以上前に更新

  • ステータス新規(New) から 解決(Resolved) に変更
  • 進捗率0 から 100 に変更

更新履歴 commit:61a1ecd66ba8 で適用されました。

Haru Iida さんが11年以上前に更新

Thanks. I've fixed.

Haru Iida さんが約11年前に更新

  • ステータス解決(Resolved) から 終了(Closed) に変更

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