ohloh over https?!

Avatar

nlmarco

about 1 month ago

Hello *,

we're running our project website http://jfire.org entirely over https and want to integrate the http://www.ohloh.net/projects/10703/widgets/projectpartnerbadge "partner badge". When I integrate this badge as indicated on http://www.ohloh.net/projects/10703/widgets many browsers show warning/error messages due to the inclusion of insecure (plain-text) content into a secure (ssl) website.

Unfortunately, it seems ohloh.net is not available on https at all. Could you please provide the ohloh service on https, too? It is not only useful for our situation, but would provide more security during login (I really don't like passwords travelling the internet in plain-text form).

Best regards, Marco :-)


Avatar

nlmarco

about 1 month ago

As a temporary solution, I wrote the script https://www.jfire.org/ohloh-ssl.php/projects/10703/widgets/projectpartnerbadge which fetches the content in the background, replaces the URLs (to force the image being loaded indirectly, too) and forwards it to the client. Unfortunately, though, ohloh.net answers differently to my script (sending some XML) than it does to the normal browser. How can I force ohloh to answer the same way? I already tried setting the User-Agent, but somehow it doesn't work. Either my User-Agent setting is ignored, or ohloh.net uses a different criteria to decide about its answer. Before I continue trying around in the dark - could you please give me some hint?


Avatar

Robin Luckey

about 1 month ago

Hi Marco,

I think your work-around script was failing because of a widget bug on our end: we were returning XML instead of JavaScript, which was breaking everyone's badges. I have fixed this problem, so your work-around might be working now.

SSL access to Ohloh might be fairly easy to set up -- we already have a certificate, but we haven't set up the server yet because we hadn't seen a need. I'll take a look at getting this running.


Avatar

Robin Luckey

about 1 month ago

Good news -- I think https://www.ohloh.net is now working. You should be able to browse the site and fetch our widgets over SSL.

There may be some hiccups; let me know if you find anything unusual.


Avatar

nlmarco

about 1 month ago

Hi Robin,

thanks a lot for the quick response and for setting up https! The URL https://www.ohloh.net/projects/10703/widgets/projectpartnerbadge is reachable now, but unfortunately, the img tag uses the http address instead of https - thus there's still a warning/error in many browsers.

Btw. the workaround works! Thanks for fixing this. But even though this works, I'd still prefer to directly include your script.

Best regards, Marco :-)


Avatar

nlmarco

about 1 month ago

Hi Robin,

if you want to test yourself, use IE 6 and go to this page: https://www.jfire.org/modules/content/id_14.html

I've temporarily added all the widgets to this (not active) page using the widgets' https links.

IE6 will tell you that it contains unsecure objects and asks whether you want to load them. If you say "No", you'll see what's still http.

Btw., IE7 seems to be much worse; it seems to make it quite hard to see anything at all (I've not tried it myself, though, because I don't have IE7 - I only have been told).

Best regards, Marco :-)


Avatar

Robin Luckey

about 1 month ago

Hi Marco,

This problem is starting to seem much more complicated than I originally thought -- which is exactly what I should have suspected when I started down this path :-)

Because our widgets are cached, there's some complications that arise when some visitors use https and others http. We need to keep the cache consistent, but we don't really want to cache the entire site twice.

When you download the widget using https, it contains an https link to Ohloh. We'd prefer that people always browse Ohloh using http, but this will take some work on our end to fix up these hrefs.

Finally, some of our widget images are hosted on Amazon S3, and I'm not sure that we can easily embed https links to these. I'll investigate.

So I can confirm your troubles, but I'm not sure I can make them all go away. I'm investigating.

Thanks, Robin


Avatar

Stuart Yeates

about 1 month ago

A little bit of reflection suggests that this can be done by using relative URLs rather than absolute URLs in the widgets.

If the "Ohloh" widget ditched:

<div class='inset'> <h4>Ohloh</h4> <ul> <li> <a href='http://www.ohloh.net/about/us'>About</a> </li> <li> ...

And used:

<div class='inset'> <h4>Ohloh</h4> <ul> <li> <a href='/about/us'>About</a> </li> <li> ...

Wouldn't that have the desired effect? Without a transport (http or https) it defaults to the current one.


Avatar

nlmarco

about 1 month ago

Hi Robin,

thanks for your quick reply! In the long run, it would be great, if it worked with directly embedding your scripts, but at the moment, our workaround works fine. We even pipe the "Project cost" widget through as can be seen here.

Thus, there's no need to hurry (stress is not healthy) :-)

Best regards, Marco :-)


Avatar

nlmarco

about 1 month ago

Hi Stuart,

I totally agree and for most of the widgets, it would solve the problem. Unfortunately, though, some of the widgets use images from another host...

...but there's a solution coming into my mind right now: If ohloh wants to host the images somewhere else and still reference them locally (with relative paths), they could use rewrite-rules (not sure, though, whether nginx supports this - apache definitely does) and forward the browser from http[s]://www.ohloh.net/images/amazon/(.*) to http[s]://www.amazon.com/whatever/url/$1

Best regards, Marco :-)


Avatar

Robin Luckey

about 1 month ago

The problem with relative URLs is that widgets are displayed on someone else's web site. Using a relative URL is a disaster when the widget is hosted at jfire.org. We must include the full URL.

Marco, I have to admit we're going to have to put the SSL complications on the list of future feature requests -- I thought I could bang it out in an hour, but it looks like it's going to take some real work.

I'm glad you got the widgets working through your workaround -- the product overview page is pretty slick :-)

Thanks, Robin