aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xclip2
1 files changed, 2 insertions, 0 deletions
diff --git a/clip b/clip
index 8e4d3dd..75d4d92 100755
--- a/clip
+++ b/clip
@@ -38,6 +38,8 @@ def fileno(filelike):
@contextlib.contextmanager
def secure_open(path, mode='r', *l, **kw):
+ if os.path.islink(path):
+ raise SecurityError("The clipboard file can not be a symlink")
real_mode = mode
if 'w' in real_mode:
real_mode = real_mode.replace('w', 'a')