Bugzilla – Attachment 119398 Details for
Bug 27594
Add access to public download link for publicly-accessible uploads
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27594: (follow-up) Check for secure context
Bug-27594-follow-up-Check-for-secure-context.patch (text/plain), 2.19 KB, created by
Owen Leonard
on 2021-04-09 15:45:10 UTC
(
hide
)
Description:
Bug 27594: (follow-up) Check for secure context
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-09 15:45:10 UTC
Size:
2.19 KB
patch
obsolete
>From 8e0e93f0708fc292df35748900220b6a24285701 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 9 Apr 2021 15:44:28 +0000 >Subject: [PATCH] Bug 27594: (follow-up) Check for secure context > >--- > .../intranet-tmpl/prog/en/modules/tools/upload.tt | 29 ++++++++++++---------- > 1 file changed, 16 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >index 6bab6e1004..0c2d404e75 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >@@ -469,19 +469,22 @@ > SubmitMe('new'); > }); > >- $(".get-file").on("click", function(e){ >- e.preventDefault(); >- if( navigator.clipboard && navigator.clipboard.writeText){ >- navigator.clipboard.writeText( $(this).attr("href") ); >- $(this).attr("data-original-title", _( "Link copied to the clipboard" ) ) >- .tooltip("show"); >- } >- }); >- $(".get-file").tooltip({ >- delay: { "show": 100, "hide": 500 } >- }).on("hidden.bs.tooltip", function(){ >- $(this).attr("data-original-title", _( "Copy link to this file" ) ); >- }); >+ if ( window.isSecureContext ) { >+ $(".get-file").on("click", function(e){ >+ e.preventDefault(); >+ if( navigator.clipboard && navigator.clipboard.writeText){ >+ navigator.clipboard.writeText( $(this).attr("href") ); >+ $(this).attr("data-original-title", _( "Link copied to the clipboard" ) ) >+ .tooltip("show"); >+ } >+ } >+ }); >+ $(".get-file").tooltip({ >+ delay: { "show": 100, "hide": 500 } >+ }).on("hidden.bs.tooltip", function(){ >+ $(this).attr("data-original-title", _( "Copy link to this file" ) ); >+ }); >+ } > }); > </script> > [% END %] >-- >2.11.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 27594
:
116218
|
116219
|
117289
|
117310
|
119241
|
119304
|
119305
|
119398
|
119906
|
119995
|
119996
|
119997
|
120416