Bugzilla – Attachment 184792 Details for
Bug 40538
XSS in hold suspend modal in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40538: Simplify code
Bug-40538-Simplify-code.patch (text/plain), 2.76 KB, created by
Jonathan Druart
on 2025-07-29 10:40:12 UTC
(
hide
)
Description:
Bug 40538: Simplify code
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-29 10:40:12 UTC
Size:
2.76 KB
patch
obsolete
>From 101dbe9573a06f7779e5aa1d78844882526003cc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 29 Jul 2025 12:36:35 +0200 >Subject: [PATCH] Bug 40538: Simplify code > >--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 25 ++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 23e5d61973d..4a136cd2e5e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -373,12 +373,13 @@ $(document).ready(function () { > "</a>" > ); > } else { >- const link = document.createElement("a"); >- link.classList.add( >- "hold-suspend", >- "btn", >- "btn-default", >- "btn-xs" >+ const link = Object.assign( >+ document.createElement("a"), >+ { >+ className: >+ "hold-suspend btn btn-default btn-xs", >+ textContent: " " + __("Suspend"), >+ } > ); > link.setAttribute( > "data-hold-id", >@@ -388,13 +389,13 @@ $(document).ready(function () { > "data-hold-title", > oObj.title > ); >- link.textContent = " " + __("Suspend"); >- const icon = document.createElement("i"); >- icon.classList.add("fa", "fa-pause"); >- link.insertAdjacentElement( >- "afterbegin", >- icon >+ const icon = Object.assign( >+ document.createElement("i"), >+ { >+ className: "fa fa-pause", >+ } > ); >+ link.prepend(icon); > return link.outerHTML; > } > }, >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40538
:
184775
|
184790
|
184792
|
184969
|
184970
|
185739
|
185740
|
185741
|
185795