Added a "error info copy & paste" text box on the 500 error page

This commit is contained in:
Bernd Bestel 2020-11-15 15:12:15 +01:00
parent 22e9e4e311
commit 3568fd9dcb
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 24 additions and 0 deletions

View File

@ -128,6 +128,7 @@ _- (Because the stock quantity unit is now the base for everything, it cannot be
- Replaced (again, added before in v2.7.0, then reverted in v2.7.1 due to some problems) [QuaggaJS](https://github.com/serratus/quaggaJS) (seems to be unmaintained) by [Quagga2](https://github.com/ericblade/quagga2)
- More `config.php` settings (see the section `Component configuration for Quagga2`) to tweak Quagga2 (this is the component used for device camera for barcode scanning) (thanks @andrelam)
- Some localization string fixes (thanks @duckfullstop)
- Better error pages
- Fixed that XSS / HTML injection was possible through some user input fields (low severity / not really a problem as this could not be abused unauthenticated)
- New translations: (thanks all the translators)
- Greek (demo available at https://el.demo.grocy.info)

View File

@ -1796,6 +1796,9 @@ msgstr ""
msgid "Stack trace"
msgstr ""
msgid "Easy error info copy & paste (for reporting)"
msgstr ""
msgid "This page does not exist"
msgstr ""

View File

@ -15,6 +15,26 @@
<h4>{{ $__t('Stack trace') }}</h4>
<pre class="my-0"><code>{!! $exception->getTraceAsString() !!}</code></pre>
</div>
<div class="alert alert-dark py-1">
<h4>{{ $__t('Easy error info copy & paste (for reporting)') }}</h4>
<textarea class="form-control easy-link-copy-textbox text-monospace mt-1"
rows="20">
Error source:
```
{!! $exception->getFile() !!}:{!! $exception->getLine() !!}
```
Error message:
```
{!! $exception->getMessage() !!}
```
Stack trace:
```
{!! $exception->getTraceAsString() !!}
```
</textarea>
</div>
</div>
</div>
@stop