浏览代码

cloudapp: fix permissions of credentials file

Fixes #4151
Marc Cornellà 6 年之前
父节点
当前提交
0c000af721
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      plugins/cloudapp/cloudapp.plugin.zsh

+ 6 - 2
plugins/cloudapp/cloudapp.plugin.zsh

@@ -1,2 +1,6 @@
-#!/bin/zsh
-alias cloudapp=$ZSH/plugins/cloudapp/cloudapp.rb
+alias cloudapp="${0:a:h}/cloudapp.rb"
+
+# Ensure only the owner can access the credentials file
+if [[ -f ~/.cloudapp ]]; then
+  chmod 600 ~/.cloudapp
+fi