summaryrefslogtreecommitdiff
path: root/addons/web_linkedin
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-10-28 17:33:21 +0100
committerThibault Delavallée <tde@openerp.com>2013-10-28 17:33:21 +0100
commit5bb4fa2b4347a99b5c1a5722d5591c06f7032d4c (patch)
treeba5127daf27cc553ebc8683a39b68ebec379f4e9 /addons/web_linkedin
parent0db0f20bda410bd6601c266026363fc95b21c9c4 (diff)
parenta7ff75f94a168e26b9e9a208167b07d45dc751cb (diff)
[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20131028163321-5o81wa1m7rzdp1dz
Diffstat (limited to 'addons/web_linkedin')
-rw-r--r--addons/web_linkedin/web_linkedin.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/web_linkedin/web_linkedin.py b/addons/web_linkedin/web_linkedin.py
index 92adb30d3dd..a07dcd50ea0 100644
--- a/addons/web_linkedin/web_linkedin.py
+++ b/addons/web_linkedin/web_linkedin.py
@@ -26,13 +26,10 @@ from urlparse import urlparse, urlunparse
import openerp
from openerp.osv import fields, osv
-class Binary(openerp.addons.web.http.Controller):
- _cp_path = "/web_linkedin/binary"
-
- @openerp.addons.web.http.jsonrequest
- def url2binary(self, req, url):
+class Binary(openerp.http.Controller):
+ @openerp.http.route('/web_linkedin/binary/url2binary', type='json', auth='user')
+ def url2binary(self, url):
"""Used exclusively to load images from LinkedIn profiles, must not be used for anything else."""
- req.session.assert_valid(force=True)
_scheme, _netloc, path, params, query, fragment = urlparse(url)
# media.linkedin.com is the master domain for LinkedIn media (replicated to CDNs),
# so forcing it should always work and prevents abusing this method to load arbitrary URLs