Skip to content

Commit 33354a2

Browse files
authored
Fix Injection + v5.0.2 (#2123)
1 parent dd255b1 commit 33354a2

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private function logSQL(QueryExecuted $query): void
223223

224224
$sql_with_bindings = Str::replaceArray('?', $bindings, $query->sql);
225225

226-
$explain = DB::select('EXPLAIN ' . $sql_with_bindings);
226+
$explain = DB::select('EXPLAIN ' . $query->sql, $query->bindings);
227227
$renderer = new ArrayToTextTable();
228228
$renderer->setIgnoredKeys(['possible_keys', 'key_len', 'ref']);
229229

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' => '050002']);
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' => '050001']);
25+
}
26+
};

resources/views/livewire/forms/album/share-with.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ class="bg-neutral-800 text-sm rounded-full w-56 px-2 pl-8 py-1 focus:outline-non
9696
@foreach ($this->userList as $result)
9797
<li class="border-b border-neutral-700 cursor-pointer transition-all ease-in-out duration-300
9898
hover:bg-gradient-to-b hover:from-primary-500 hover:to-primary-600 hover:text-text-main-0"
99-
wire:click="select('{{ $result['id'] }}','{{ $result['username'] }}')">
99+
wire:click="select('{{ $result['id'] }}',@js($result['username']))">
100100
<a class="px-1 py-1 flex items-center"
101101
@if ($loop->last) @keydown.tab="isSearchUserOpen = false" @endif>
102-
<span class="ml-4 text-left">{{ $result['username'] }}</span>
102+
<span class="ml-4 text-left">{{ ($result['username']) }}</span>
103103
</a>
104104
</li>
105105
@endforeach

version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.1
1+
5.0.2

0 commit comments

Comments
 (0)