From 0c000af72162a5bd5147e8eedd25e810619f6c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 8 Apr 2019 22:19:25 +0200 Subject: [PATCH] cloudapp: fix permissions of credentials file Fixes #4151 --- plugins/cloudapp/cloudapp.plugin.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/cloudapp/cloudapp.plugin.zsh b/plugins/cloudapp/cloudapp.plugin.zsh index 99252f690..3b363c81b 100644 --- a/plugins/cloudapp/cloudapp.plugin.zsh +++ b/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