Browse Source

cloudapp: fix permissions of credentials file

Fixes #4151
Marc Cornellà 6 years ago
parent
commit
0c000af721
1 changed files with 6 additions and 2 deletions
  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