Actions
Defect #40121
openInvalidCrossOriginRequest exception raised by automated pentests or malicous user
Defect #40121:
InvalidCrossOriginRequest exception raised by automated pentests or malicous user
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Resolution:
Affected version:
Description
Problem¶
When an automated pentest or a malicous user requests for example:
the following exception will be raised:
An ActionController::InvalidCrossOriginRequest occurred in projects#autocomplete: Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
Note: Any other url containing *.js will raise this exception.
All currently supported versions of Redmine are affected.
Solution¶
The solution is to rescue from ActionController::InvalidCrossOriginRequest.
The attached patch file fix_invalid_cross_origin_request_exception.patch gives an example how to do that. A test is also included.
Files
Actions