From 19344f0584d4d6d4526fdf331adc60530e3f685b Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 18 Apr 2024 21:45:30 -0500 Subject: [PATCH] Fix JS injection in Service Templates (#15954) You can't put user data in any "onwhatever" attributes, there is no way to sanitize it there. Use data attributes instead. --- .../views/service-template/index.blade.php | 62 ++++++++++++++----- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/resources/views/service-template/index.blade.php b/resources/views/service-template/index.blade.php index 50f11c63dc31..8843bbe6e3a6 100644 --- a/resources/views/service-template/index.blade.php +++ b/resources/views/service-template/index.blade.php @@ -17,7 +17,7 @@ {{ __('New Service Template') }} @@ -49,18 +49,32 @@ class="fa fa-refresh" aria-hidden="true"> {{ __('Apply Service Templates') } {{ __(ucfirst($template->type)) }} {{ $template->type == 'dynamic' ? $template->getDeviceParser()->toSql(false) : '' }} - - - - - + + + + + + @endforeach @@ -151,7 +165,11 @@ class="fa fa-refresh" aria-hidden="true"> {{ __('Apply Service Templates') } @section('scripts')