Did you ever wish to have all relevant information about a visitor right when he hits your site? Think of (full) name, gender and maybe hobbies and interests? Thanks to social networks we could at least get some of that data. All you need is the URL to that visitors (public) Facebook or Google+ profile – but if he doesn’t actively give it to you, you’re probably out of luck.
What if we could get that profile URL without the user even noticing it?
Inspired by the great article When Security Generates Insecurity (hat tip to Michael, who shared it and implemented the proposed login-check) I discovered that it is possible to get the profile URL of a logged-in Facebook user by exploiting the Content-Security-Policy implementation in Google Chrome. It requires some preconditions, but it’s definitly possible – and I’m going to explain how it works and why it’s dangerous in really great detail 😉