Skip to content

Commit

Permalink
Throw an error if callbacks are not enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmollenhour committed Sep 5, 2024
1 parent 9337d37 commit 0e01106
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ public function callbackController($method, $query, $headers, $data)
header('Connection: close', TRUE);
ob_start();

if (!$this->_pluginInstance->getPluginInfo('info/callbacks/enabled')) {
throw new Exception('Callbacks are not enabled for this plugin.', 409);
}
if (empty($query['secret_key'])) {
throw new Exception('Unknown secret key.', 409);
}
Expand Down

0 comments on commit 0e01106

Please sign in to comment.