From c70536ff0c677f07711b73b99b421f7622c4790d Mon Sep 17 00:00:00 2001 From: Őry Máté <orymate@iit.bme.hu> Date: Wed, 30 Jan 2013 11:37:08 +0100 Subject: [PATCH] store: also ignore files outside home --- miscellaneous/store-server/TopList.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miscellaneous/store-server/TopList.py b/miscellaneous/store-server/TopList.py index 066d887..2ed0f4a 100644 --- a/miscellaneous/store-server/TopList.py +++ b/miscellaneous/store-server/TopList.py @@ -11,7 +11,9 @@ def update_new(name): if os.path.normpath(name).find("/.") != -1: return home = pwd.getpwuid(os.stat(name).st_uid).pw_dir - top_dir = os.path.join(home, "../.top") + if not name.startswith(home): + return + top_dir = os.path.normpath(os.path.join(home, "../.top")) try: os.mkdir(top_dir) except OSError: -- libgit2 0.26.0