Bug 14571 - using_https check for ssl connections doesn't work in some situations
Summary: using_https check for ssl connections doesn't work in some situations
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Liz Rea
QA Contact: Testopia
URL:
Keywords:
: 15518 (view as bug list)
Depends on:
Blocks: 17137
  Show dependency treegraph
 
Reported: 2015-07-20 22:38 UTC by Liz Rea
Modified: 2017-12-07 22:15 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14571: using_https check for ssl connections doesn't work in some situations (3.45 KB, patch)
2015-07-20 23:22 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 14571: HTTPS Amazon images [follow up] (2.69 KB, patch)
2015-07-20 23:22 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 14571 - More switching of Amazon image source URL to https (8.32 KB, patch)
2015-07-20 23:23 UTC, Liz Rea
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14571: using_https check for ssl connections doesn't work in some situations (3.56 KB, patch)
2016-01-04 14:11 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14571: HTTPS Amazon images [follow up] (2.79 KB, patch)
2016-01-04 14:13 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14571 - More switching of Amazon image source URL to https (8.42 KB, patch)
2016-01-04 14:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 14571: using_https check for ssl connections doesn't work in some situations (3.58 KB, patch)
2016-01-08 10:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14571: HTTPS Amazon images [follow up] (2.81 KB, patch)
2016-01-08 10:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14571 - More switching of Amazon image source URL to https (8.44 KB, patch)
2016-01-08 10:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14571 - Intranet detail needs ssl sources for Amazon images (2.23 KB, patch)
2016-01-08 10:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Use SSL when querying Open Library API (733 bytes, patch)
2016-05-20 08:58 UTC, Oliver Behnke
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2015-07-20 22:38:26 UTC
This is especially problematic for Amazon images, since if the check fails the normal images are used, causing mixed content warnings. 

I think we should remove the checks from Amazon images in the OPAC and just use the https Amazon url's for images.
Comment 1 Liz Rea 2015-07-20 23:22:33 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2015-07-20 23:22:54 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2015-07-20 23:23:05 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2016-01-04 04:01:59 UTC
Can we get a sign off on this please, I can't sign it off.
Comment 5 Owen Leonard 2016-01-04 14:11:56 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2016-01-04 14:13:25 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2016-01-04 14:13:47 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-01-07 11:16:37 UTC
There are 2 more left, is it expected?

koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:                <img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" />
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:            <img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" />
Comment 9 Liz Rea 2016-01-07 20:36:28 UTC
I didn't go after the intranet here, but I didn't specify so I'll add a followup. :)

Liz
Comment 10 Liz Rea 2016-01-07 20:36:50 UTC
Can we get these ones through first though? I'll make a different bug for the intranet detail.

Cheers,
Liz
Comment 11 Jonathan Druart 2016-01-08 10:38:47 UTC
Created attachment 46418 [details] [review]
Bug 14571: using_https check for ssl connections doesn't work in some situations

To test:

* turn on Amazon images for result and detail in the OPAC
* do a search that will result in an Amazon image being displayed on the
  result page
* inspect the cover image that is returned on the result page, it should
  be using a https://images-na... Amazon URL.
* click through to the detail for that item
* inspect the cover image that is returned on the detail page, it should
  be using a https://images-na... Amazon URL.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2016-01-08 10:38:51 UTC
Created attachment 46419 [details] [review]
Bug 14571: HTTPS Amazon images [follow up]

I found a couple more places where we should be using images-na, so I
updated them

* in the shelf browser
* in XISBN related works (honestly not sure how to test this one, but
  changing from the http:// url won't hurt anything.)

To test:

* Turn on the shelf browser, and browse for an item that has an amazon
  image,
* inspect it, it should be using https://images-na... url.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2016-01-08 10:38:54 UTC
Created attachment 46420 [details] [review]
Bug 14571 - More switching of Amazon image source URL to https

modified:   modules/opac-opensearch.tt
       modified:   modules/opac-results-grouped.tt
       modified:   modules/opac-shelves.tt
       modified:   modules/opac-showreviews-rss.tt
       modified:   modules/opac-showreviews.tt

Basically, just inspect these places and make sure the Amazon images are
using https://images-na instead of http://images

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2016-01-08 10:38:58 UTC
Created attachment 46421 [details] [review]
Bug 14571 - Intranet detail needs ssl sources for Amazon images

To test:

Enable Amazon images for the staff client - syspref:  AmazonCoverImages -> Show
Go to a record detail in the intranet that has an Amazon image, inspect it, and make sure that it

1. Shows
2. has https://images-na. and not http://images.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2016-01-08 10:39:29 UTC
(In reply to Liz Rea from comment #10)
> Can we get these ones through first though? I'll make a different bug for
> the intranet detail.
> 
> Cheers,
> Liz

I have embedded it in this patch set.
Comment 16 Jonathan Druart 2016-01-08 10:39:43 UTC
*** Bug 15518 has been marked as a duplicate of this bug. ***
Comment 17 Liz Rea 2016-01-10 20:41:03 UTC
Sweet as, thanks!
Comment 18 Brendan Gallagher 2016-01-27 06:13:43 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 19 Oliver Behnke 2016-05-20 08:28:05 UTC
This seems to be limited to Amazon cover images. If so, why? How about the other providers like Open Library where I run into a similar problem (HTTP API call blocked for a full HTTPS Koha site).

Thanks
Comment 20 Oliver Behnke 2016-05-20 08:58:12 UTC
Created attachment 51640 [details] [review]
Use SSL when querying Open Library API

FWIW, here's a patch to use SSL for Open Library as well...
Comment 21 Jonathan Druart 2016-05-20 14:19:47 UTC
(In reply to Oliver Bock from comment #20)
> Created attachment 51640 [details] [review] [review]
> Use SSL when querying Open Library API
> 
> FWIW, here's a patch to use SSL for Open Library as well...

Would you please open a new bug report (and link it to this one) to attach your patch?
This one is marked as "pushed to master" and new patches should go on their own bug report.
Comment 22 Oliver Behnke 2016-05-30 11:46:37 UTC
(In reply to Jonathan Druart from comment #21)
> Would you please open a new bug report (and link it to this one) to attach
> your patch?
> This one is marked as "pushed to master" and new patches should go on their
> own bug report.

Done: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16615