XSRF protection

This commit is contained in:
burke.davey
2010-05-25 23:16:21 +00:00
parent 20d0a396a0
commit b667cef0ab

View File

@@ -47,6 +47,7 @@ function sendToPhone(title, url, selection) {
var sendUrl = baseUrl + '?title=' + encodeURIComponent(title) +
'&url=' + encodeURIComponent(url) + '&sel=' + encodeURIComponent(selection);
req.open('GET', sendUrl, true);
req.setRequestHeader('X-Extension', 'true'); // XSRF protector
req.onreadystatechange = function() {
if (this.readyState == 4) {