Bugzilla – Attachment 119906 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.15 KB, created by
Owen Leonard
on 2021-04-20 12:24:25 UTC
(
hide
)
Description:
Bug 27594: (follow-up) Check for secure context
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-20 12:24:25 UTC
Size:
2.15 KB
patch
obsolete
>From ceb2f000c5edadb2f5205124ff064ad033bc8174 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 | 28 ++++++++++++---------- > 1 file changed, 15 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..ba01b642c2 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,21 @@ > 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