Bug 14571

Summary: using_https check for ssl connections doesn't work in some situations
Product: Koha Reporter: Liz Rea <liz>
Component: OPACAssignee: Liz Rea <liz>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, chris, gwilliams, jonathan.druart, oliver.behnke
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15518
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14523
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11358
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16615
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17137    
Attachments: Bug 14571: using_https check for ssl connections doesn't work in some situations
Bug 14571: HTTPS Amazon images [follow up]
Bug 14571 - More switching of Amazon image source URL to https
[SIGNED-OFF] Bug 14571: using_https check for ssl connections doesn't work in some situations
[SIGNED-OFF] Bug 14571: HTTPS Amazon images [follow up]
[SIGNED-OFF] Bug 14571 - More switching of Amazon image source URL to https
Bug 14571: using_https check for ssl connections doesn't work in some situations
Bug 14571: HTTPS Amazon images [follow up]
Bug 14571 - More switching of Amazon image source URL to https
Bug 14571 - Intranet detail needs ssl sources for Amazon images
Use SSL when querying Open Library API

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