mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 02:01:37 +00:00
Updated exception handler to reduce the amount of detail shown to prevent potentially sensitive details (like internal paths) being shown in the error message. Added an interface for specifically marking exceptions whos messages we may want to show. Thanks to Tanner Marks for reporting.
14 lines
236 B
PHP
14 lines
236 B
PHP
<?php
|
|
|
|
namespace BookStack\Exceptions;
|
|
|
|
use Exception;
|
|
|
|
class PermissionsException extends Exception implements ShowsApiExceptionMessage
|
|
{
|
|
public function getMessageForApi(): string
|
|
{
|
|
return $this->getMessage();
|
|
}
|
|
}
|