Community mailing list archives

community@mail.odoo.com

Re: Proplem with dbfilter nginx ssl

by
Ghulam Masood
- 05/21/2016 05:21:35
The same problem was faced by me in this simple and yet effective solution is to simply logout of your database and then reconnect you will find it working instead of going for bug fixes. 

Regards,
Ghulam Masood,
IM|Sciences, Peshawar

On Sat, May 21, 2016 at 11:26 AM, <info@ygol.com> wrote:
Hi communiy,
 
running odoo 9e with dbfilter and nginx with ssl, I've faced a problem "session expired" and thus not being able to stay logged in the different databases. This is what's in the log:
 
Traceback (most recent call last):
  File "/odoo/odoo-server/openerp/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/openerp/http.py", line 1625, in _dispatch_nodb
    func, arguments = self.nodb_routing_map.bind_to_environ(request.httprequest.environ).match()
  File "/usr/lib/python2.7/dist-packages/werkzeug/routing.py", line 1433, in match
    raise NotFound()
NotFound: 404: Not Found
 
I followed:
 
and modified in http.py which solve the problem.
 
def setup_db(self, httprequest):
    db = httprequest.session.db
    # Check if session.db is legit
    if db:
        if db not in db_filter([db], httprequest=httprequest):
            _logger.warn("Logged into database '%s', but dbfilter " "rejects it; logging session out.", db)
            # httprequest.session.logout() <----------- disable the session logout
            # db = None <----------- return db = db, i.e. do nothing by this function
            db = db
    if not db:
        httprequest.session.db = db_monodb(httprequest)
 
1. Do you know a way to fix the problem without modifying core code?
2. What would be the consequences of these modification to http.py?
 
thank you.
 
 
--
Yves Goldberg - איב גולדברג
odooOfficial Partner - OCA member
Open Source ERP, CRM & CMS
 
 
Raanana [ISRAEL]
 
LinkedIn  Skype  Github  Quora 
--
 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe