Skip to content

Commit e87e426

Browse files
authored
Fix version 4.9 log-viewer paths hard coding (#1857)
1 parent 841c64f commit e87e426

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ public function boot()
115115
*/
116116
LogViewer::auth(function ($request) {
117117
// We must disable unsafe-eval because vue3 used by log-viewer requires it.
118+
// We must disable unsafe-inline because log-viewer uses inline script with parameter to boot.
119+
// Those parameters are not know by Lychee if someone modifies the config.
118120
// We only do that in that specific case. It is disabled by default otherwise.
119121
config(['secure-headers.csp.script-src.unsafe-eval' => true]);
122+
config(['secure-headers.csp.script-src.unsafe-inline' => true]);
120123

121124
// Allow to bypass when debug is ON and when env is dev
122125
// At this point, it is no longer our fault if the Lychee admin have their logs publically accessible.

config/log-viewer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
|
4646
*/
4747

48-
'back_to_system_url' => config('app.url', null),
48+
'back_to_system_url' => '../', // config('app.url', null),
4949

5050
'back_to_system_label' => null, // Displayed by default: "Back to {{ app.name }}"
5151

config/secure-headers.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@
512512
// upload.check()
513513
'CL4mGy9ZhHM+PkLDZsWVuM25kEFBv3FXlmWe/O9Unmc=',
514514

515-
'UGZMnMEgbggabrnTmjaxzU2xHCzzqWszgOgN/xRyKn4=',
516515
/*
517516
document.addEventListener("DOMContentLoaded", function(event) {
518517
document.querySelector("form").addEventListener("submit", function(e){
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Support\Facades\DB;
5+
6+
return new class() extends Migration {
7+
/**
8+
* Run the migrations.
9+
*
10+
* @return void
11+
*/
12+
public function up(): void
13+
{
14+
DB::table('configs')->where('key', 'version')->update(['value' => '040901']);
15+
}
16+
17+
/**
18+
* Reverse the migrations.
19+
*
20+
* @return void
21+
*/
22+
public function down(): void
23+
{
24+
DB::table('configs')->where('key', 'version')->update(['value' => '040900']);
25+
}
26+
};

version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.9.0
1+
4.9.1

0 commit comments

Comments
 (0)