Bugzilla – Attachment 185740 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.82 KB, created by
Paul Derscheid
on 2025-08-25 11:54:41 UTC
(
hide
)
Description:
Bug 40538: Simplify code
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2025-08-25 11:54:41 UTC
Size:
2.82 KB
patch
obsolete
>From a85b4cf913fc34b75383705cf195d47bb685b634 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 > >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 043c2719f63..7d38de75143 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -386,12 +386,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", >@@ -401,13 +402,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.51.0
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