aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-12-09 11:10:13 +0100
committerVG <vg@devys.org>2016-12-09 11:10:13 +0100
commita67983a2b100c811cbecd8cdef71277ce4549889 (patch)
treeef0a7250b657fce2d2cfd6a9286bab3a24222994
parentc7a845d942c25e3e88d8c60afd17b9cab071e510 (diff)
downloadclip-a67983a2b100c811cbecd8cdef71277ce4549889.tar.gz
clip-a67983a2b100c811cbecd8cdef71277ce4549889.tar.bz2
clip-a67983a2b100c811cbecd8cdef71277ce4549889.zip
be more clear about symlink error
-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')