Bugzilla – Attachment 95003 Details for
Bug 23075
Incorrect URL should have a meaningful error message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23075: (follow-up) Dissallow transparent redirects
Bug-23075-follow-up-Dissallow-transparent-redirect.patch (text/plain), 2.29 KB, created by
Martin Renvoize (ashimema)
on 2019-11-04 13:16:39 UTC
(
hide
)
Description:
Bug 23075: (follow-up) Dissallow transparent redirects
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-11-04 13:16:39 UTC
Size:
2.29 KB
patch
obsolete
>From eed7aa4615c1ebb8028f34a8be57dab277c5c206 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 4 Nov 2019 13:13:16 +0000 >Subject: [PATCH] Bug 23075: (follow-up) Dissallow transparent redirects > >GET request redirects were causing the http URL to 'pass' our 'good url' >test for http => https redirected mana servers. However, on the >subsquent POST request to get a mana security token we would fail as the >POST was not transparently redirected. > >This patch changes the request to be a simple_request so we will catch >bad urls earlier and it also prevents submissions for security tokens if >the configured URL is identified as bad. >--- > Koha/SharedContent.pm | 3 +-- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt | 2 ++ > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/SharedContent.pm b/Koha/SharedContent.pm >index 04cb67502d..0e9c8a91bf 100644 >--- a/Koha/SharedContent.pm >+++ b/Koha/SharedContent.pm >@@ -58,8 +58,7 @@ sub process_request { > $mana_request->content( to_json($content) ); > } > >- my $response = $userAgent->request($mana_request); >- >+ my $response = $userAgent->simple_request($mana_request); > eval { $result = from_json( $response->decoded_content, { utf8 => 1} ); }; > $result->{code} = $response->code; > if ( $@ ){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt >index d441b06dc6..a1940a8cbc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt >@@ -46,6 +46,7 @@ > > <p>Learn more about Mana KB on the <a href="https://wiki.koha-community.org/wiki/Mana_central_database">official Mana KB documentation</a>.</p> > >+ [% IF mana_url && !bad_url %] > [% IF (mana_url) %] > <p>Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p> > [% END %] >@@ -136,6 +137,7 @@ > </fieldset> > </form> > [% END %] >+ [% END # /IF mana_url && !bad_url %] > </div> > </div> <!-- /.col-sm-10.col-sm-push-2 --> > >-- >2.20.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 23075
:
90440
|
90459
|
90594
|
90595
|
90596
|
90606
|
90682
|
94098
|
94363
|
95000
|
95003
|
95009
|
95074
|
95075
|
95076
|
95078
|
95079
|
95080
|
95081