I can manipulate your amazon.com recommendations

Mittwoch, 28. März 2012, 16:55 Uhr von Felix

I can put any item of my choice on your personalized amazon.com homepage. Did I hear you say Bollocks!? Well, here is proof:

  1. Open this page.
  2. Visit amazon.com.
  3. Observe Dale Carnegie’s classic How to win friends and influence people appear on your personalized amazon.com homepage (see screenshot below for comparison).
  4. Order it if you are interested, it is a great read (optional step ;-))!

So how does it work? The page contains a hidden iframe that triggers an HTTP GET request to the book’s page on amazon.com. Now amazon thinks you are interested in this article and recommends it and similar ones to you on their homepage. I would like to leave possible malicious applications to your imagination.

How to fix this? If the X-Frame-Options response header is set to SAMEORIGIN, modern browsers will not allow third party websites to include a page. Interestingly, the German amazon website amazon.de does this.

I have informed amazon.com of this issue via Twitter and E-Mail.

Disclosure: all links to amazon.com are referral links.

Update (2012-04-05): amazon.com got back to me and told me that they have added the X-Frame-Options header.

Using Python Lambdas for Fun and Derivatives

Mittwoch, 29. Februar 2012, 11:11 Uhr von Felix

Today, I have a few lines of code for you:

def derivative(f, h=0.000001):
    return lambda x: (f(x + h) - f(x))/h

sqd = derivative(lambda x: x**2) # first derivative of f(x) = x²
print sqd(12)

Beautiful, isn’t it? Although this is CS101* material, it never ceases to amaze me. (In Scheme this is more aesthetically pleasing, but I thought that more of you would be able to read Python.)

* e.g., Einführung in die Informatik offered by Prof. Guido Wirtz (University of Bamberg)

RoR und DB2

Sonntag, 09. November 2008, 23:02 Uhr von Felix

Endlich kann auch der SEDA Lehrstuhl mit Ruby on Rails arbeiten: IBM stellt nun offiziell einen DB2-Adapter zur Verfügung.

Ein kleiner Schritt für IBM, ein großer für die Menschheit. Danke, IBM!

Diskurswelt Setup

Mittwoch, 13. August 2008, 14:54 Uhr von Felix

Ein kleiner Blick unter die Motorhaube: Diskurswelt wird von mir und Hans auf einem eigenen, virtuellen Server namens fhchaos gehostet. Relevante Softwarepakete sind:

Diskurswelt nutzt WordPress mit einem selbsterstellten Theme sowie den folgenden Plugins:

EmbedAVideo WordPress Plugin

Dienstag, 20. Mai 2008, 12:07 Uhr von Felix

Da mir die bestehenden Video-Plugins für WordPress entweder von der Handhabung nicht gefallen, unzählige Shortcodes einführen oder keinen XHTML 1.0 Strict validen Code generieren, habe ich mir schlichtweg ein eigenes geschrieben: ich freue mich euch EmbedAVideo vorstellen zu dürfen.

Due to the fact that most video plugins for WordPress have an aweful usability, introduce reams of video shortcodes or are unable to generate XHTML 1.0 Strict valid code, I decided to roll my own. Here is EmbedAVideo. Diesen Beitrag weiterlesen »