Edgewall Software

Ticket #3036: disable_tracd_login_hack.patch

File disable_tracd_login_hack.patch, 1.6 KB (added by ximon.eighteen@…, 6 years ago)

Patch to disable TracD auth so that the AccountManager? login form works.

  • standalone.py

    old new  
    286286        if not env: 
    287287            self.server.send_project_index(req) 
    288288            return 
    289          
    290         req.remote_user = None 
    291         if path_info == '/login': 
    292             auth = self.server.auths.get(project_name) or \ 
    293                    self.server.auths.get('*') 
    294             if not auth: 
    295                 raise util.TracError('Authentication not enabled. ' 
    296                                      'Please use the tracd --auth option.\n') 
    297             req.remote_user = auth.do_auth(self) 
    298             if not req.remote_user: 
    299                 return 
     289 
     290        # XGE 2007-07-23 Ticket 3036 is fixed in Trac trunk (changeset 3158) 
     291        # but this is not fixed in this version (0.9.6). I added this if block 
     292        # to quickly hack a solution. "if True" gives default Trac behaviour, 
     293        # "if False" disables the login check in TracD and allows the  
     294        # AccountManager plugin to work. Warning: Barely tested. 
     295        if True: 
     296            req.remote_user = None 
     297            if path_info == '/login': 
     298                auth = self.server.auths.get(project_name) or \ 
     299                       self.server.auths.get('*') 
     300                if not auth: 
     301                    raise util.TracError('Authentication not enabled. ' 
     302                                         'Please use the tracd --auth option.\n') 
     303                req.remote_user = auth.do_auth(self) 
     304                if not req.remote_user: 
     305                    return 
    300306 
    301307        try: 
    302308            start = time.time()