Resolve relative paths and symlinks before opening auth/session DB
This commit is contained in:
		
							parent
							
								
									024e76423d
								
							
						
					
					
						commit
						c9c02d3253
					
				@ -617,7 +617,7 @@ class SqliteSessionManager(SimpleSessionManager):
 | 
				
			|||||||
    def __init__(self, session_db_path):
 | 
					    def __init__(self, session_db_path):
 | 
				
			||||||
        SimpleSessionManager.__init__(self)
 | 
					        SimpleSessionManager.__init__(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.session_db_path = os.path.abspath(session_db_path)
 | 
					        self.session_db_path = os.path.realpath(session_db_path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _conn(self):
 | 
					    def _conn(self):
 | 
				
			||||||
        new = not os.path.exists(self.session_db_path)
 | 
					        new = not os.path.exists(self.session_db_path)
 | 
				
			||||||
 | 
				
			|||||||
@ -42,7 +42,7 @@ class SqliteUserManager(SimpleUserManager):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def __init__(self, auth_db_path, collection_path=None):
 | 
					    def __init__(self, auth_db_path, collection_path=None):
 | 
				
			||||||
        SimpleUserManager.__init__(self, collection_path)
 | 
					        SimpleUserManager.__init__(self, collection_path)
 | 
				
			||||||
        self.auth_db_path = auth_db_path
 | 
					        self.auth_db_path = os.path.realpath(auth_db_path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def auth_db_exists(self):
 | 
					    def auth_db_exists(self):
 | 
				
			||||||
        return os.path.isfile(self.auth_db_path)
 | 
					        return os.path.isfile(self.auth_db_path)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user