Defect #36394 » 36394-mail_handler_controller_permit_parameters.patch
| app/controllers/mail_handler_controller.rb | ||
|---|---|---|
|
# Submits an incoming email to MailHandler
|
||
|
def index
|
||
|
options = params.dup
|
||
|
options = params.permit(
|
||
|
:key,
|
||
|
:email,
|
||
|
:allow_override,
|
||
|
:unknown_user,
|
||
|
:default_group,
|
||
|
:no_account_notice,
|
||
|
:no_notification,
|
||
|
:no_permission_check,
|
||
|
:project_from_subaddress,
|
||
|
{
|
||
|
issue: [
|
||
|
:project,
|
||
|
:status,
|
||
|
:tracker,
|
||
|
:category,
|
||
|
:priority,
|
||
|
:assigned_to,
|
||
|
:fixed_version,
|
||
|
:is_private
|
||
|
]
|
||
|
}
|
||
|
).to_h
|
||
|
email = options.delete(:email)
|
||
|
if MailHandler.safe_receive(email, options)
|
||
|
head :created
|
||