From 9fd48d6513f8ba8599a6ae5a97ce0ee9557fa3a7 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Thu, 21 Mar 2019 14:34:28 -0400 Subject: [PATCH] allow claim id to be directly passed to dmca page --- controller/action/ReportActions.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/controller/action/ReportActions.class.php b/controller/action/ReportActions.class.php index ddc12f9e..441eef28 100644 --- a/controller/action/ReportActions.class.php +++ b/controller/action/ReportActions.class.php @@ -24,6 +24,10 @@ class ReportActions extends Actions $values[$field] = $value; } + if ($_GET['claim_id'] && !$values['identifier']) { + $values['identifier'] = htmlspecialchars($_GET['claim_id']); + } + if (!$errors) { $values['report_id'] = Encoding::base58Encode(random_bytes(6)); Mailgun::sendDmcaReport($values); @@ -31,6 +35,9 @@ class ReportActions extends Actions return Controller::redirect(Request::getRelativeUri(), 303); } - return ['report/dmca', ['errors' => $errors, 'values' => $values]]; + return ['report/dmca', [ + 'errors' => $errors, + 'values' => $values + ]]; } }