Bugzilla – Attachment 184970 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.86 KB, created by
Marcel de Rooy
on 2025-08-01 07:31:06 UTC
(
hide
)
Description:
Bug 40538: Simplify code
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-08-01 07:31:06 UTC
Size:
2.86 KB
patch
obsolete
>From f76a53f966b4471b309fd60b8014f0ddeb70e63c 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 >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 23e5d61973..4a136cd2e5 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.39.5
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