by mehrdadn · 7y ago · 0 comments
i'm still convinced this is cargocult security.
If so, it could be argued the bug already existed and this patch simply uses the existing behaviour...
You're right though, I didn't see the issue was still there. The home directory should also not be there either. I think I looked at this too hastily but now I'm confused too.
os.path.realpath(__file__)
That will give you the absolute path of the current python script, dereferencing any symlink and the .. notation.