Browse Source

Disabled shared secret check and return 500 not 400 on error

proxy_request
Rodrigo Gonzalez 4 years ago
parent
commit
bd3c0fb660
  1. 5
      src/WebhooksController.php
  2. 2
      src/exceptions/WebhookFailed.php

5
src/WebhooksController.php

@ -14,9 +14,10 @@ class WebhooksController
public function __invoke(Request $request) public function __invoke(Request $request)
{ {
$jobConfigKey = NotificationType::{$request->input('notification_type')}(); $jobConfigKey = NotificationType::{$request->input('notification_type')}();
$this->determineValidRequest($request->input('password'));
$notificationId = AppleNotification::storeNotification($jobConfigKey, $request->input()); AppleNotification::storeNotification($jobConfigKey, $request->input());
//$this->determineValidRequest($request->input('password'));
$payload = NotificationPayload::createFromRequest($request); $payload = NotificationPayload::createFromRequest($request);

2
src/exceptions/WebhookFailed.php

@ -8,7 +8,7 @@ class WebhookFailed extends Exception
{ {
public static function nonValidRequest() public static function nonValidRequest()
{ {
return new static("Your shared secret does not match password in Apple's request", 400); return new static("Your shared secret does not match password in Apple's request", 500);
} }
public static function jobClassDoesNotExist(string $jobClass) public static function jobClassDoesNotExist(string $jobClass)

Loading…
Cancel
Save