Skip to content

Commit

Permalink
Limit OpenStorage check to 'find' (#1447)
Browse files Browse the repository at this point in the history
Allow get for direct access, eg. for ajax calls.
  • Loading branch information
barryvdh authored Aug 25, 2023
1 parent 070a313 commit bfd0131
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Controllers/OpenHandlerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function isStorageOpen(Request $request)

public function handle(Request $request)
{
if ($this->isStorageOpen($request)) {
if ($request->input('op') === 'get' || $this->isStorageOpen($request)) {
$openHandler = new OpenHandler($this->debugbar);
$data = $openHandler->handle($request->input(), false, false);
} else {
Expand Down Expand Up @@ -63,10 +63,6 @@ public function handle(Request $request)
*/
public function clockwork(Request $request, $id)
{
if (!$this->isStorageOpen($request)) {
throw new DebugBarException("To enable public access to previous requests, set debugbar.storage.open to true in your config, or enable DEBUGBAR_OPEN_STORAGE if you did not publish the config.");
}

$request = [
'op' => 'get',
'id' => $id,
Expand Down

0 comments on commit bfd0131

Please sign in to comment.