diff options
Diffstat (limited to 'addons/web_linkedin/web_linkedin.py')
| -rw-r--r-- | addons/web_linkedin/web_linkedin.py | 9 |
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 |
