Mixed content security warnings in search results and record details

Bug #787295 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.0
Fix Released
Undecided
Unassigned
2.1
Fix Released
Undecided
Unassigned

Bug Description

* Evergreen 2.0.6

When accessing search results or record details via HTTPS in the default skin, browsers raise a mixed content warning due to the presence of JavaScript resources loaded via hardcoded HTTP URLs. While users can easily disable these warnings, that's not a security practice that we want to encourage or be responsible for.

Accordingly, the branch at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commit;h=b65195ba579485681a8a304495abd47836257b9a contains a fix that sets the protocol for the requests to Google to match the page protocol.

Please review and merge if acceptable.

Revision history for this message
Dan Scott (denials) wrote :

Turns out that this is impossible to fix unless we proxy the requests ourselves - at least, not without switching to the new v1 API for Google Books, which then adds the complication of needing an API key and being limited to 1,000 requests / day (by default - can be extended by request, but is it worth adding this to the complications in our current JavaScript configuration? Methinks no.)

So the right way to resolve this is probably to treat Google Books as just another added content provider and to proxy the requests via the Evergreen server (while enabling the configuration bits for API key etc to be configured in opensrf.xml).

I will kill my branch accordingly.

Changed in evergreen:
milestone: 2.0.7 → none
status: In Progress → New
Dan Scott (denials)
tags: removed: review
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Is someone working on this? If so, please change status to In Progress?

Dan Wells (dbw2)
Changed in evergreen:
status: New → In Progress
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Dan Wells (dbw2) wrote :

Here are a few branches which attempt to deal with this issue (and switch to the new Books search API, a needed step).

For master:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dbwells/lp787295_google_book_api_and_ssl_change

For 2.1 and 2.0:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dbwells/lp787295_google_book_api_and_ssl_change_2_1

To quote the commit message:

Switch to new Google Books API; make SSL friendly

As implied in the title, this commit does two things. First, it
switches to the new Google Books API (which is both imminent and
also necessary to make SSL calls work). Though the information is
scant, from what I have read and experienced, we do not need an
API key to do searches and previews. I have also not hit any kind
of unauthenticated limit in several days of heavy testing, so I
would figure we are safe (at this point) for normal end-user OPAC
browsing.

Second, all Google Book requests are now done over https. This
eliminates the majority of mixed content warnings when browsing
securely, though you still get a warning when you actual do preview
a book.

In addition to possibly implementing protocol detection (rather
than doing https all the time as a "lowest" common denominator),
there are a few minor points where we might consider future changes.
Those points are commented within the code.

Thank you,
Dan

Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
Revision history for this message
Dan Scott (denials) wrote :

The API was pretty restrictive back in May when it originally launched; I would get locked out if I ran five or so anonymous queries against the Google Books API within the span of a few seconds, so it sounds like they've relaxed that since then. Good news!

Merged into our production 2.0 system and it works nicely - thanks Dan! Committed to rel_2_0 through master.

Changed in evergreen:
status: In Progress → Fix Committed
milestone: none → 2.2.0
Revision history for this message
George Duimovich (george-duimovich) wrote :

We're running 2.1.1 and this bug appears to affect us in IE8 (tested in default skin).

Can your patch be backported for use on 2.1.1 system or is it only for 2.2.0?

Revision history for this message
Dan Wells (dbw2) wrote :

Hello George,

This fix has already been backported and will appear in Evergreen 2.1.2.

Dan

Changed in evergreen:
milestone: 2.2.0alpha1 → 2.2.0alpha2
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.