Skip to content

Commit 1570ff2

Browse files
authored
Don't render raw HTML returned by the alert bag (#5475)
ref: GHSA-mgr9-6c2j-jxrq
1 parent 2bd9d8b commit 1570ff2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎app/Models/DatabaseHost.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DatabaseHost extends Model
6262
*/
6363
public static array $validationRules = [
6464
'name' => 'required|string|max:191',
65-
'host' => 'required|string',
65+
'host' => 'required|string|regex:/^[\w\-\.]+$/',
6666
'port' => 'required|numeric|between:1,65535',
6767
'username' => 'required|string|max:32',
6868
'password' => 'nullable|string',

‎resources/views/layouts/admin.blade.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
@foreach (Alert::getMessages() as $type => $messages)
146146
@foreach ($messages as $message)
147147
<div class="alert alert-{{ $type }} alert-dismissable" role="alert">
148-
{!! $message !!}
148+
{{ $message }}
149149
</div>
150150
@endforeach
151151
@endforeach

0 commit comments

Comments
 (0)