Defect #19325

ActionController::UnknownFormat: error for PDF request and unknown user

Added by Björn Peemöller almost 3 years ago. Updated almost 3 years ago.

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

0%

Category:Accounts / authentication
Target version:3.0.1
Resolution:Fixed Affected version:3.0.0

Description

Hi, I just got the following error for my Redmine 3.0.0 installation:

ERROR MESSAGE:

ActionController::UnknownFormat: ActionController::UnknownFormat

WHERE:

issues#show

app/controllers/application_controller.rb:238
app/controllers/application_controller.rb:266

URL:

https://<our-server>/issues/353.pdf

BROWSER:

100.0%     Googlebot 2.1 ()

FULL BACKTRACE:

[GEM_ROOT]/gems/actionpack-4.2.0/lib/action_controller/metal/mime_responds.rb:218
app/controllers/application_controller.rb:238
app/controllers/application_controller.rb:266
[GEM_ROOT]/gems/activesupport-4.2.0/lib/active_support/rescuable.rb:80
...

The problem arises when a user that is not logged in tries to retrive the PDF export of an issue, which is not allowed in our configuration. It seems for me that the method require_login in application_controller.rb is missing a case for the PDF format.

Associated revisions

Revision 14069
Added by Jean-Philippe Lang almost 3 years ago

Fixed that #require_login should respond for other request types (#19325).

History

#1 Updated by Jean-Philippe Lang almost 3 years ago

  • Subject changed from Redmine 3.0.0 throws ActionController::UnknownFormat: ActionController::UnknownFormat for PDF request and unknown user to Redmine 3.0.0 throws ActionController::UnknownFormat: for PDF request and unknown user
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.0.1
  • Resolution set to Fixed

The problem arises when a user that is not logged in tries to retrive the PDF export of an issue, which is not allowed in our configuration

Permission for exporting to PDF is not a core feature but this error should be fixed by r14069.

#2 Updated by Björn Peemöller almost 3 years ago

Thanks for fixing this!

#3 Updated by Jean-Philippe Lang almost 3 years ago

  • Subject changed from Redmine 3.0.0 throws ActionController::UnknownFormat: for PDF request and unknown user to ActionController::UnknownFormat: error for PDF request and unknown user
  • Status changed from Resolved to Closed

Also available in: Atom PDF